php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29272 MySQLi - Multi_query
Submitted: 2004-07-20 09:27 UTC Modified: 2005-11-22 18:06 UTC
From: zewzew at luukku dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.0.0 OS: WinXP (Home)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: zewzew at luukku dot com
New email:
PHP Version: OS:

 

 [2004-07-20 09:27 UTC] 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);
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-20 11:28 UTC] derick@php.net
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.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC