For the complete documentation index, see llms.txt. This page is also available as Markdown.

mysql_stmt_store_result

mysql_stmt_store_result buffers the complete result set of a prepared SELECT, SHOW, DESCRIBE, or EXPLAIN statement on the client, enabling random access and row count queries.

Syntax

int mysql_stmt_store_result(MYSQL_STMT * stmt);

Parameter

Description

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.

Return Value

Returns zero on success, nonzero if an error occurred.

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

See Also

spinner

Last updated

Was this helpful?