ID: 49573 Updated by: u...@php.net Reported By: terryllong at gmail dot com -Status: Open +Status: Bogus Bug Type: MySQLi related Operating System: Windows XP PHP Version: 5.3.0 New Comment:
I checked the tests. They cover all supported statements and they pass. If you want mysqli_info() to support more than the statements listed in the MySQL documentation, please file a feature request at bugs.mysql.com. Previous Comments: ------------------------------------------------------------------------ [2009-09-16 23:15:59] u...@php.net It could be a bogus bug because: "Note that mysql_info() returns a non-NULL value for INSERT ... VALUES only for the multiple-row form of the statement (that is, only if multiple value lists are specified)", http://dev.mysql.com/doc/refman/5.1/en/mysql-info.html Please check what happens for the statements listed in the MySQL manual. ------------------------------------------------------------------------ [2009-09-16 21:12:30] terryllong at gmail dot com Description: ------------ Mysqli_info doesn't seem to return results when using INSERT .. values Reproduce code: --------------- <?php $link = mysqli_connect( 'host,'un', 'pw' ) or die("Connect to db didn't work..."); $crlf=chr(13) .chr(10); $test = mysqli_query($link, "CREATE DATABASE IF NOT EXISTS test") or die("Create db didn't work..."); $test = mysqli_query($link, "USE test") or die("Use TEST db didn't.."); $test = mysqli_query($link, "CREATE TEMPORARY TABLE IF NOT EXISTS t1 (city varchar(30))") or die("Create Temp Table didn't work..."); $data = mysqli_query($link, "INSERT INTO t1 (city) VALUES ('Tulsa')") or die("Insert data didn't work..."); $info_from_insert = mysqli_info($link); print_r("mysqli_info values from 'INSERT' = $info_from_insert $crlf"); print_r("Var_Dump of mysqli_info = "); var_dump($info_from_insert); print_r("---------$crlf"); $data= mysqli_query( $link , "SELECT CITY FROM t1 " ) or die("Select statement didn't..."); $rows = mysqli_affected_rows($link); echo "Rows 'Affected' = $rows $crlf"; //- Get number of affected rows in previous MySQL operation $select_info = mysqli_info($link); print_r("select info: $select_info $crlf"); print_r("Var_Dump of mysqli_info = "); var_dump($info_from_insert); echo $crlf; $mysqli_test = mysqli_fetch_all($data, MYSQLI_ASSOC) ; echo "results from mysqli_fetch_all..$crlf"; var_dump($mysqli_test); ?> Expected result: ---------------- Expect text string show the results of the insert. Actual result: -------------- Results of Insert query returns a string(0) as shown with a Var_dump ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49573&edit=1