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

Please see http://bugs.php.net/bug.php?id=49573 for an explanation.

mysql_info() does not return anything for single-row INSERTs and that
is how it should be.


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

[2009-09-16 07:34:50] j...@php.net

Please try using this snapshot:

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

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



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

[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