#29272 [Opn->Bgs]: MySQLi - Multi_query
| From: | derick@php.net | Date: | Tue, 20 Jul 2004 09:28:35 +0000 |
| Subject: | #29272 [Opn->Bgs]: MySQLi - Multi_query | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-62707@lists.php.net to get a copy of this message | ||
ID: 29272
Updated by: derick@php.net
Reported By: zewzew at luukku dot com
-Status: Open
+Status: Bogus
Bug Type: *Database Functions
Operating System: WinXP (Home)
PHP Version: 5.0.0
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
.
Previous Comments:
------------------------------------------------------------------------
[2004-07-20 09:27:46] zewzew at luukku dot com
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 this bug report at http://bugs.php.net/?id=29272&edit=1