mysql_warning_count()
unsigned int mysql_warning_count(MYSQL *mysql)
This function returns the number of warning messages
encountered from the previous query. This can be useful, for instance,
when performing multiple INSERT statements with the
IGNORE flag. Here is an example:
...
MYSQL *mysql;
mysql = mysql_init(NULL);
mysql_real_connect(mysql,"localhost","root","password",
"workrequests",0,NULL,0);
...
unsigned int warnings = mysql_warning_count(mysql);
printf("Number of Warnings: %d \n", warnings);
...