ID:               30645
 Updated by:       [EMAIL PROTECTED]
 Reported By:      michael at kofler dot cc
-Status:           Open
+Status:           Closed
 Bug Type:         MySQLi related
 Operating System: linux (suse 9.1)
 PHP Version:      5CVS-2004-11-01 (dev)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

 


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

[2004-11-01 10:05:55] michael at kofler dot cc

Description:
------------
I am using MySQL 5.0.1 (snapshot) and PHP 5.0.2 with mysqli interface
(latest snapshot) under Linux (SUSE 9.1).

I use $mysqli->multi_query to call a SP. I want to get back the SELECT
results of the SP.

With a normal connect ($mysqli = new mysqli($mysqlhost, $mysqluser,
$mysqlpasswd, $mysqldb)), I don't get results.

However, if I instead use $mysqli = mysqli_init +
$mysqli->real_connect() with the very same parameters, everything works
fine (many thanks to Gleb Paharenko for this tip).


Reproduce code:
---------------
This is my SP:

CREATE PROCEDURE `test`()
BEGIN
   SELECT * FROM t1;
END

And this it the PHP code

   $ok = $mysqli->multi_query("CALL test()");
   if($ok) {
     echo "<p>OK</p>\n";
     do {
       echo "<p>result</p>\n";
       $result = $mysqli->store_result();
       if($result) {
         show_table($result);  // shows result details
         $result->close();
       }
     } while($mysqli->next_result());
   }




Expected result:
----------------
With $mysqli->real_connect, the code above works fine.

Actual result:
--------------
With a normal connect ($mysqli = new mysqli(...)), $ok is always false.


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


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

Reply via email to