Multiple record sets PDO:dblib #5104

Closed
chriskl opened this Issue Sep 12, 2013 · 3 comments

Projects

None yet

2 participants

@chriskl
chriskl commented Sep 12, 2013

Hi,

If I try this in ZF 2.2:

$x = $this->getMenuTable()->fetchAll();
$y = $this->getListTable()->fetchAll();
foreach ($x as $r) {
    \Zend\Debug\Debug::dump($r);
}

Then the $r values dumped will actually be the rows from $y. This seems to be because FreeTDS does not support multiple active results sets, or PHP is screwing up.

Is there any way of telling ZF2 to read all resultsets into RAM (inefficient, I know), to avoid having to change all code everywhere in this project, that works fine with SQLSRV for windows?

Chris

@ralphschindler
Member

I'm really not sure, as we do not directly support dblib. Can you do this in PDO directly?

@chriskl
chriskl commented Nov 16, 2013

Straingely it seems it works in PHP 5.4.lownumber and failing in PHP 5.5 - perhaps the PHP devs have screwed it up somewhere :(

@ralphschindler
Member

I'm chalking this up to a PHP issue. If you can find an issue and produce a PR, I would perhaps entertain that, but since we don't "officially" support dblib though FreeTDS, I think we can close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment