From: zewzew at luukku dot com
Operating system: WinXP (Home)
PHP version: 5.0.0
PHP Bug Type: *Database Functions
Bug description: MySQLi - Multi_query
Description:
------------
sorry bad English.
Warning: mysqli_error() expects exactly 1 parameter, 0 given in
E:\htdocs\index.php on line 30
Click Reload-button
work: Ok
Click Reload-button
Warning: mysqli_error() expects exactly 1 parameter, 0 given in
E:\htdocs\index.php on line 30
Click Reload-button
work: Ok
Click Reload-button
Warning: mysqli_error() expects exactly 1 parameter, 0 given in
E:\htdocs\index.php on line 30
etc......
What is wrong?
WinXP (home)
Apache 2.0.50
MySQL 4.1.3-beta
Reproduce code:
---------------
<?php
$link = mysqli_connect("localhost", "xxx", "xxxx", "test");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$query = "SELECT CURRENT_USER();";
$query .= "SELECT Name FROM City ORDER BY ID LIMIT 20, 5";
/* 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));
}
else
mysqli_error();
/* close connection */
mysqli_close($link);
?>
--
Edit bug report at http://bugs.php.net/?id=29272&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29272&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29272&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29272&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29272&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29272&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29272&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29272&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29272&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29272&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29272&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29272&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29272&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29272&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29272&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29272&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29272&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29272&r=float