Name

mysql_info( )

Synopsis

char *mysql_info(MYSQL *mysql)

This returns a string containing information provided by MySQL when certain SQL statements are executed. This function works only with five types of SQL statements: INSERT INTO...SELECT..., INSERT INTO... VALUES..., LOAD DATA INFILE, ALTER TABLE, and UPDATE. For all other statements, this function typically returns NULL.

...
mysql_query(mysql, "UPDATE clients
                     SET telephone_areacode = '985'
                     WHERE city = 'Hammond'");
printf("Query Info: %s \n", mysql_info(mysql));
...

The results of the previous program excerpt will look like the following:

Query Info: Rows matched: 3  Changed: 3  Warnings: 0

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.