|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57982 PDOStatement->nextRowset() doesn't work
Submitted: 2007-12-29 18:00 UTC Modified: 2013-02-18 00:35 UTC
From: lunter at interia dot pl Assigned:
Status: No Feedback Package: PDO (PECL)
PHP Version: 5_2 CVS-2007-12-29 OS: WinXP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
10 + 11 = ?
Subscribe to this entry?

 [2007-12-29 18:00 UTC] lunter at interia dot pl
PDOStatement->nextRowset() doesn't work

Reproduce code:
 $h=new PDO('mysql:host=localhost;dbname=root','root','root');

// $q=$h->query('CALL some_proc()');
 $q=$h->query('SELECT 1 AS col;SELECT 2 AS col;');



Expected result:
Array ( [0] => Array ( [col] => 1 ) ) 
Array ( [0] => Array ( [col] => 2 ) )

Actual result:
Array ( [0] => Array ( [col] => 1 ) ) 
Array ( )


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-30 07:42 UTC] lunter at interia dot pl
This is rather important bug, becouse it doesn't permite to full use stored procedures by MySQL, MS SQL etc. programmers.
 [2008-07-03 08:04 UTC] uwendel at mysql dot com
Multi statement is a different feature than fetching results from a stored procedure! 

Multi statement contradicts the idea of PDO to take measures against SQL injections. Don't use multi statements unless you have a good reason for it. Unfortunately PDO does enable multi statements by default! Its strange to see PDO insist on Prepared Statements for "security reasons" but opening up all SQL injection doors by enabling multi statements by default.

Note that the MySQL server does not support multi statements with native prepared statements (= when turning off PDOs buggy prepared statement emulation).

Issue is fixed in PDO_MYSQLND. Please wait for PDO_MYSQLND.
 [2008-07-22 10:42 UTC] uwendel at mysql dot com
Please try again using PHP 5.3+ . You can download PHP 5.3+ from

Make sure that you try this with PHP 5.3+ and mysqlnd (--with-pdo-mysql=mysqlnd , default). It might not work when using the mysqlclient library (libmysql, --with-pdo-mysql=/path/to/mysql_config)
 [2012-03-15 02:55 UTC] kxscjjunzn at whedtt dot com
cxlmbcvht, <a href="">mrlssfvevf</a> , [url=]bburouynkr[/url], mrlssfvevf
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Oct 18 18:03:40 2021 UTC