ID:               42399
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mfeldheim at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         MySQLi related
 Operating System: Linux Debian
 PHP Version:      5.2.3
 New Comment:

See bug #32882 and bug #35203



Previous Comments:
------------------------------------------------------------------------

[2007-08-23 14:51:29] mfeldheim at gmail dot com

Description:
------------
After calling a mysql stored procedure with mysqli_query I get the
error "Commands out of sync; you can't run this command now" with the
following mysqli_query execution.

That is independent from mysqli_query resultmode parameter or a
postquery $result->close();

In my case the mysql procedure returns a resultset - didnt test for the
case of no resultset

Reproduce code:
---------------
$mysqli = new mysqli($host, $user, $password, $database);
$result = $mysqli->query('CALL mysql_stored_procedure(abc)');
if( $mysqli->errno ) die( $mysqli->error );
while( $data = $result->fetch_object() ):
        print_r( $data );
endwhile;
$result->close();

$result = $mysqli->query('SELECT column1, column2 FROM table WHERE id =
1');
if( $mysqli->errno ) die( $mysqli->error );
while( $data = $result->fetch_object() ):
        print_r( $data );
endwhile;
$result->close();
$mysqli->close();

Expected result:
----------------
mysqli_result (
  resultset for the first query
)

mysqli_result (
 resultset for the second query
)

Actual result:
--------------
mysqli_result (
  resultset for the first query
)

Commands out of sync; you can't run this command now




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42399&edit=1

Reply via email to