mysql_store_result()
MYSQL_RES *mysql_store_result(MYSQL *mysql)
You must call
mysql_store_result() or mysql_use_result() for every query
which successfully retrieves data (SELECT, SHOW,
DESCRIBE, EXPLAIN).
mysql_store_result() reads the entire result of a query to the client,
allocates a MYSQL_RES structure, and places the result into this
structure.
An empty result set is returned if there are no rows returned. (An empty
result set differs from a NULL return value.)
Once you have called mysql_store_result(), you may call
mysql_num_rows() to find out how many rows are in the result set.
You can call mysql_fetch_row() to fetch rows from the result set,
or mysql_row_seek() and mysql_row_tell() to obtain or
set the current row position within the result set.
You must call mysql_free_result() once you are done with the result
set.
A MYSQL_RES result structure with the results. NULL if
an error occurred.
CR_COMMANDS_OUT_OF_SYNC
CR_OUT_OF_MEMORY
CR_SERVER_GONE_ERROR
CR_SERVER_LOST
CR_UNKNOWN_ERROR