php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37567 MySQLi multi_query functionality results in error
Submitted: 2006-05-23 22:08 UTC Modified: 2006-05-23 22:48 UTC
From: alexander dot over at koeln dot de Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.1.4 OS: Suse 9.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alexander dot over at koeln dot de
New email:
PHP Version: OS:

 

 [2006-05-23 22:08 UTC] alexander dot over at koeln dot de
Description:
------------
Sorry for that english :D

When trying to use the multi_query functions from mysqli adapter, it always fails with an syntax error if more than one sql statement is given to the function/object.

Reproduce code:
---------------
$mysqli = new mysqli('localhost', 'root', '', 'test');

$query  = "SELECT CURRENT_USER();";
$query .= "SELECT CURRENT_USER();";

if ($mysqli->multi_query($query)) {
   do {
       	if ($result = $mysqli->store_result()) {
           while ($row = $result->fetch_row()) {
               printf("%s\n", $row[0]);
           }
           $result->close();
       	}
   } while ($mysqli->next_result());
} else {
	echo $mysqli->error;
}

$mysqli->close();

Expected result:
----------------
root@localhost
root@localhost

Actual result:
--------------
Fehler in der Syntax bei ';SELECT CURRENT_USER()' in Zeile 1.

(German Locale)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-23 22:48 UTC] bjori@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.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Works just fine. Check your server.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC