April 2008
Intermediate to advanced
566 pages
21h 55m
English
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);
...Read now
Unlock full access