mysql_stmt_bind_result — Binds variables to a prepared statement for result storage

my_bool mysql_stmt_bind_result(MYSQL_STMT * stmt,
                               MYSQL_BIND * bind);

Binds columns in the result set to variables.

Parameters

stmt

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

bind

An array of MYSQL_BIND structures. The size of this array must be equal to the number of columns in result set.

Return value

Zero on success, non-zero on failure.

[Note]

To determine the number of columns in result set use mysql_stmt_field_count().

A column can be bound or rebound at any time, even after a result set has been partially retrieved. The new binding takes effect the next time mysql_stmt_fetch() is called.

See also

mysql_stmt_field_count(), mysql_stmt_execute(), mysql_stmt_fetch()