|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66624 Bug? Don't return the results of all sentences SQL
Submitted: 2014-02-01 21:29 UTC Modified: 2014-02-16 02:14 UTC
Avg. Score:3.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: bspbsp15 at gmail dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.5.8 OS: Windows 7 SP1 x32
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.
Block user comment
Status: Assign to:
Bug Type:
From: bspbsp15 at gmail dot com
New email:
PHP Version: OS:


 [2014-02-01 21:29 UTC] bspbsp15 at gmail dot com
From manual page:
If you put in multi_query() 3 SQL sentences for example: Valid1; Non-valid2; Valid3; only you get results of the first SQl sentence.

┬┐Is a bug or its my conceptual error?

Test script:
$query  = 'Valid SQL sentence;';
$query .= 'NON valid SQL sentence;';    //For example: Incorrect table.
$query .= 'Valid SQL sentence;';


$mysqli->next_result();             //Returns TRUE, ok (valid SQL sentence)
$result = $mysqli->store_result();
$row = $result->fetch_assoc();

$mysqli->next_result();             //Returns FALSE, Ok (non valid SQL sentence)

$mysqli->next_result();             //Returns FALSE, but is a valid SQL sentence
$result = $mysqli->store_result();
$row = $result->fetch_assoc();

Expected result:
In the second evaluation $mysqli->next_result() returns FALSE because is a non-valid SQL sentece is OK, but if you try to get the results of the next valid SQL sentence you can't, if you try to evaluate again retuns FALSE again.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-16 02:14 UTC]
-Status: Open +Status: Not a bug
 [2014-02-16 02:14 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

MySQL  can't safely continue parsing after an error. PHP doesn't care.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Jul 04 04:05:46 2022 UTC