ID: 50041 Updated by: [email protected] Reported By: jille at hexon dot cx -Status: Open +Status: Wont fix Bug Type: Feature/Change Request Operating System: Linux PHP Version: 5.3.0 New Comment:
The classic mysql extension won't get new features. For new features please use mysqli, which already provides this functionality: http://de.php.net/manual/en/mysqli.warning-count.php Previous Comments: ------------------------------------------------------------------------ [2009-10-30 14:17:57] jille at hexon dot cx 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 this bug report at http://bugs.php.net/?id=50041&edit=1
