You can call the mysql_more_results() function to check whether more results exist.
Syntax
my_bool
mysql_more_results(MYSQL *mysql)
Return values
TRUE (1) is returned if more results exist, and FALSE (0) is returned if no more results exist.
Errors
None.
Notes
This function is used when you execute multiple statements specified as a single statement string, or when you execute CALL statements. It can return multiple result sets.
mysql_more_results() is TRUE if more results exist from the currently executed statement, in which case the application must call mysql_next_result() to fetch the results.
In most cases, you can call mysql_next_result() to test whether more results exist and initiate retrieval if more results exist.