Name

mysql_eof

Synopsis

my_bool mysql_eof(MYSQL_RES *result)

Returns a nonzero value if there is no more data in the group of results being examined. If there is an error in the result set, zero is returned. This function only works of the result set was retrieved with the mysql_use_result function.

Example

/* Read through the results until no more data comes out */
while((row = mysql_fetch_row(results)))
{
       /* Do work */
}

if(!mysql_eof(results))
{
   printf("Error. End of results not reached.\n");

Get MySQL and mSQL 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.