mysql_warning_count() returns the number of errors, warnings, and comments generated during the execution of the previous SQL statement.
Syntax
unsigned int
mysql_warning_count(MYSQL *mysql)
Return values
The number of warnings.
Error messages
None.