|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-09-16 07:34 UTC] jani@php.net
[2009-09-17 11:47 UTC] uw@php.net
[2009-09-21 10:04 UTC] jille at hexon dot cx
[2009-09-21 17:13 UTC] uw@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 22:00:01 2025 UTC |
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)