[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
mysql_next_result()
int mysql_next_result(MYSQL *mysql)
If more query results exist, mysql_next_result()
reads the
next query results and returns the status back to application.
Available from MySQL 4.1.
Note that you must call mysql_free_result()
for the preceding
query if it returned a result set.
After calling mysql_next_result()
the state of the connection
is as if you had called mysql_real_query()
for the next query.
This means that you can now call mysql_store_result()
,
mysql_warning_count()
, mysql_affected_rows()
... on the
connection.
If mysql_next_result()
returns an error, no other statements will
be executed and there is no more results to fetch.
See section 19.1.8 C API Handling of Multiple Query Execution.
0 if successful and there was more results -1 if no more results > 0 if an error occurred.
CR_COMMANDS_OUT_OF_SYNC
mysql_use_result()
for a previous result set.
CR_SERVER_GONE_ERROR
CR_SERVER_LOST
CR_UNKNOWN_ERROR