mysql_next_result()
int mysql_next_result(MYSQL *mysql)
Use this function to read the next row of data from a
results set. It returns 0 if successful and if there are more results
to retrieve, and –1 if it was successful in retrieving data, but there
are no further rows to retrieve. It returns an error (or a value
greater than 0) if it’s unsuccessful because the results set was not
loaded with the data. You can use the
mysql_more_results() function to check for
more results before invoking this function.