#50041 [NEW]: [patch] mysql_warning_count() for ext/mysql
| From: | jille at hexon dot cx | Date: | Fri, 30 Oct 2009 14:17:57 +0000 |
| Subject: | #50041 [NEW]: [patch] mysql_warning_count() for ext/mysql | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-144101@lists.php.net to get a copy of this message | ||
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