ID:               49562
 Updated by:       j...@php.net
 Reported By:      jille at hexon dot cx
-Status:           Open
+Status:           Feedback
 Bug Type:         MySQL related
 Operating System: Linux
 PHP Version:      5.3.0
 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:
------------------------------------------------------------------------

[2009-09-15 13:08:24] jille at hexon dot cx

Description:
------------
mysql_info() returns false when inserting only one row. This results in
the unability to retreive the number of warnings which might have
occurred.

if $numWarnings > 0 I would like to retreive the warnings with
mysql_query("SHOW WARNINGS"); but I'd prefer not doing that if there are
no warnings.

Reproduce code:
---------------
mysql_query("CREATE TABLE a (a VARCHAR(4))");
mysql_query("INSERT INTO a (a) VALUES ('abcde')");
var_dump(mysql_info());

Expected result:
----------------
Just like the mysql-CLI:

mysql> INSERT INTO a (a) VALUES ('abcde');
Query OK, 1 row affected, 1 warning (0.01 sec)

so something like "1 row affected, 1 warning" would be perfect

Actual result:
--------------
bool(false)



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49562&edit=1

Reply via email to