mysql_stmt_fetch — Fetches result buffer into bound buffer

int mysql_stmt_fetch(MYSQL_STMT * stmt);

Fetch the result from a prepared statement into the buffer bound by mysql_stmt_bind_result().

Parameters

stmt

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

Return value

Returns one of the following values

0

Success

MYSQL_NO_DATA

End of result set reached

MYSQL_DATA_TRUNCATION

One or more values are truncated

[Note]

Note that all columns must be bound by the application before calling mysql_stmt_fetch().

Data are transferred unbuffered without calling mysql_stmt_store_result() which can decrease performance (but reduces memory cost).

See also

mysql_stmt_prepare(), mysql_stmt_bind_result(), mysql_stmt_execute()