From: jille at hexon dot cx Operating system: Linux PHP version: 5.3.0 PHP Bug Type: Feature/Change Request Bug description: [patch] mysql_warning_count() for ext/mysql
Description: ------------ I have 'implemented' MySQL's mysql_warning_count() function. ( http://dev.mysql.com/doc/refman/5.1/en/mysql-warning-count.html ) This function returns the number of warnings from the previous query. In some queries (INSERT INTO .. VALUES (..), (..); INSERT INTO .. SELECT; etc) mysql_info() was usable to return the number of warnings; but for single-row inserts mysql_info() returns false. The function is very straightforward, almost the same as mysql_thread_id(). mysql_warning_count() is available in MySQL's C-api in >3.23, >4.1 and >5 The patch is available at http://jille.hexon.cx/mysql-warning-count.diff It is based on PHP 5.3.0 and at least works for me. -- Edit bug report at http://bugs.php.net/?id=50041&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50041&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50041&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50041&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50041&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50041&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50041&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50041&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50041&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50041&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50041&r=support Expected behavior: http://bugs.php.net/fix.php?id=50041&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50041&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50041&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50041&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50041&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50041&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50041&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50041&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50041&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50041&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50041&r=mysqlcfg
