#28860 [NEW]: multiple statements don't work with mysqli_multi_query

From: Date: Sun, 20 Jun 2004 22:44:25 +0000
Subject: #28860 [NEW]: multiple statements don't work with mysqli_multi_query
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-61133@lists.php.net to get a copy of this message
From: adamsbarker at hotmail dot com Operating system: Windows XP PHP version: 5CVS-2004-06-21 (dev) PHP Bug Type: MySQL related Bug description: multiple statements don't work with mysqli_multi_query 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 bug report at http://bugs.php.net/?id=28860&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28860&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28860&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28860&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28860&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28860&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28860&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28860&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28860&r=support Expected behavior: http://bugs.php.net/fix.php?id=28860&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28860&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28860&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28860&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28860&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28860&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28860&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28860&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28860&r=float

« previous php.bugs (#61133) next »