Edit report at https://bugs.php.net/bug.php?id=62803&edit=1
ID: 62803 Comment by: ni...@php.net Reported by: jackspr at hotmail dot com Summary: nextRowset not returning false Status: Feedback Type: Bug Package: PDO related Operating System: Windows Server 2008 PHP Version: 5.3.15 Block user comment: N Private report: N New Comment: @ssufficool: Probably this is the same bug as https://bugs.php.net/bug.php?id=62820, which is a mysqlnd issue. Previous Comments: ------------------------------------------------------------------------ [2012-09-13 04:01:16] ssuffic...@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. Which PDO driver are you using? I.e. MySQL, MSSQL, DBLIB, PGSQL ------------------------------------------------------------------------ [2012-08-12 16:09:02] jackspr at hotmail dot com update ------------------------------------------------------------------------ [2012-08-12 16:06:11] jackspr at hotmail dot com Description: ------------ --- >From manual page: http://www.php.net/pdostatement.nextrowset#refsect1- pdostatement.nextrowset-seealso --- nextRowset is not returning false. The code below causes an exception in the fetchAll line because it is trying to access a result set does not exist. $r=0 $qy = "CALL getAllInfo()"; $istmt = $con->prepare($qy); if ($istmt->execute()) { $outcome = self::SUCCESS; do { $result[$r] = $istmt->fetchAll(PDO::FETCH_ASSOC); $r++; } while($istmt->nextRowset()); } Test script: --------------- $r=0 $qy = "CALL getAllInfo()"; $istmt = $con->prepare($qy); if ($istmt->execute()) { $outcome = self::SUCCESS; do { $result[$r] = $istmt->fetchAll(PDO::FETCH_ASSOC); $r++; } while($istmt->nextRowset()); } Expected result: ---------------- Clean exit with all possible resultsets in the result array. Actual result: -------------- exception 'PDOException' with message 'SQLSTATE[HY000]: General error' ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62803&edit=1