Oracle 5.0 Reference Manual page 2188

Table of Contents

Advertisement

Before each call to mysql_next_result(), you must call
statement if it is a statement that returned a result set (rather than just a result status).
After calling
mysql_real_query()
mysql_store_result(), mysql_warning_count(), mysql_affected_rows(), and so forth.
If your program uses
flag must be enabled. This is because each
to any result sets that might be returned by statements executed within the procedure. Because
can return multiple results, process them using a loop that calls
whether there are more results.
CLIENT_MULTI_RESULTS
either explicitly by passing the
CLIENT_MULTI_STATEMENTS
It is also possible to test whether there are more results by calling mysql_more_results().
However, this function does not change the connection state, so if it returns true, you must still call
mysql_next_result()
For an example that shows how to use mysql_next_result(), see
for Multiple Statement
Return Values
Return Value
0
-1
>0
Errors
CR_COMMANDS_OUT_OF_SYNC
Commands were executed in an improper order. For example, if you didn't call
mysql_use_result()
CR_SERVER_GONE_ERROR
The MySQL server has gone away.
CR_SERVER_LOST
The connection to the server was lost during the query.
CR_UNKNOWN_ERROR
An unknown error occurred.
20.6.6.47.
mysql_num_fields()
unsigned int mysql_num_fields(MYSQL_RES *result)
To pass a
MYSQL*
Description
Returns the number of columns in a result set.
C API Function Descriptions
mysql_next_result()
or
mysql_query()
statements to execute stored procedures, the
CALL
can be enabled when you call mysql_real_connect(),
CLIENT_MULTI_RESULTS
(which also enables CLIENT_MULTI_RESULTS).
to advance to the next result.
Execution".
[2942]
for a previous result set.
[2942]
[2942]
[2941]
argument instead, use
the state of the connection is as if you had called
for the next statement. This means that you can call
returns a result to indicate the call status, in addition
CALL
flag itself, or implicitly by passing
Description
Successful and there are more results
Successful and there are no more results
An error occurred
unsigned int mysql_field_count(MYSQL
2168
mysql_free_result()
CLIENT_MULTI_RESULTS
mysql_next_result()
Section 20.6.15, "C API Support
for the current
CALL
to determine
*mysql).

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents