Name

mysql_next_result( )

Synopsis

int mysql_next_result(MYSQL *mysql)

Use this 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.

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.