mysql_stmt_attr_set — Modifies the behavior of a prepared statement
my_bool mysql_stmt_attr_set(MYSQL_STMT * stmt,
enum enum_stmt_attr_type,
const void * attr);
Used to modify the behavior of a prepared statement. This function may be called multiple times to set several attributes.
Indicates if mysql_stmt_store_result()
will update the max_length
value of MYSQL_FIELD
structures.
Cursor type. Possible values are CURSOR_TYPE_READ_ONLY
or default value CURSOR_TYPE_NO_CURSOR
.
Number of rows which will be prefetched. The default value is 1.
stmt
A statement handle, which was previously allocated by mysql_stmt_init()
.
enum_stmt_attr_type
The attribute that you want to set. It can have one of the following values:
attr
The value to assign to the attribute
If you use the If you open a cursor for a prepared statement it is unnecessary to call |