Hi,
I am using MySQL 5.0.1 (snapshot) and PHP 5.0.2 with mysqli interface (latest snapshot) under Linux (SUSE 9.1).
I would like to call a SP using PHP 5, and I want to get back the SELECT results.
This is my SP:
CREATE PROCEDURE `test`() BEGIN SELECT * FROM t1; END
From the comments in http://bugs.mysql.com/bug.php?id=2273 I understand I have to use mysqli_multi_query if I want to get rowsets from a SP. Fine:
$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());
}I don't get any results, $ok is FALSE.
If I instead use the following code, everything works fine, I receive both rowsets. So, the PHP code above seems to be ok as long as I don't call a SP.
$ok = $mysqli->multi_query("SELECT * FROM t1; SELECT * FROM t1");Any ideas? Error in MySQL or in PHP?
Thank you,
Michael Kofler
http://www.kofler.cc/
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
