mysql_stmt_store_result — Transfers a result set from a prepared statement

int mysql_stmt_store_result(MYSQL_STMT * stmt);

You must call mysql_stmt_store_result() for every query that successfully produces a result set (SELECT, SHOW, DESCRIBE, EXPLAIN), and only if you want to buffer the complete result set by the client, so that the subsequent mysql_stmt_fetch() call returns buffered data.

Parameters

stmt

A statement handle, which was previously allocated by mysql_stmt_init().

Return value

Zero on success, nonzero if an error occured.

[Note]

You can detect whether the statement produced a result set by checking the return value of mysql_stmt_result_metadata() function.

See also

mysql_stmt_result_metadata(), mysql_stmt_fetch()