ID: 28860
Updated by: [EMAIL PROTECTED]
Reported By: adamsbarker at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: MySQL related
Operating System: Windows XP
PHP Version: 5CVS-2004-06-21 (dev)
New Comment:
if mysqli_multi_query fails, you should check your error
with mysqli_error instead of filing a bug report.
Previous Comments:
------------------------------------------------------------------------
[2004-06-21 00:44:24] adamsbarker at hotmail dot com
Description:
------------
"mysqli_multi_query" works fine when only using 1 statement, however
when using more than 1 statement the function returns empty.
Reproduce code:
---------------
$query = "SELECT * FROM database_name.first_table;";
$query .= "SELECT * FROM database_name.second_table";
/* execute multi query */
if (mysqli_multi_query($link, $query)) {
do {
/* store first result set */
if ($result = mysqli_store_result($link)) {
while ($row = mysqli_fetch_row($result)) {
printf("%s\n", $row[0]);
}
mysqli_free_result($result);
}
/* print divider */
if (mysqli_more_results($link)) {
printf("-----------------\n");
}
} while (mysqli_next_result($link));
}
Expected result:
----------------
Works perfect when this line is taken out:
$query .= "SELECT * FROM database_name.second_table";
But doesn't work when this line is kept in.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28860&edit=1