Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Multiple record sets PDO:dblib #5104

chriskl opened this Issue · 3 comments

2 participants



If I try this in ZF 2.2:

$x = $this->getMenuTable()->fetchAll();
$y = $this->getListTable()->fetchAll();
foreach ($x as $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?



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


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 :(


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
Something went wrong with that request. Please try again.