From:             nxcoder at gmail dot com
Operating system: win2000
PHP version:      5.0.1
PHP Bug Type:     MySQLi related
Bug description:  mulit_query's error

Description:
------------
use 

$str ="select @@autocommit;";
$str .= "select current_user();";

reportting errors!

-------------------------
use

$str ="select @@autocommit;";
or
$str = "select current_user();";

result is right;




Reproduce code:
---------------
<?php

echo "<pre>";

$mysqli = new mysqli("localhost", "root", "", "EPS");
if(mysqli_connect_errno())
    die(mysqli_connect_error());

$str ="select @@autocommit;";
$str .= "select current_user();";

$mysqli->multi_query($str) or die($mysqli->error);
do{
    if($result=$mysqli->store_result())
        while($row = $result->fetch_array())
            print_r($row);
} while($mysqli->next_result());


?>

Expected result:
----------------
print out two array

Actual result:
--------------
Unknown command


-- 
Edit bug report at http://bugs.php.net/?id=30081&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30081&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30081&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30081&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30081&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30081&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30081&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30081&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30081&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30081&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30081&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30081&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30081&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30081&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30081&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30081&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30081&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30081&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30081&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30081&r=mysqlcfg

Reply via email to