C API Prepared Statement Function Descriptions
2213
/* Free the prepared result metadata */
mysql_free_result(prepare_meta_result);
/* Close the statement */
if (mysql_stmt_close(stmt))
{
fprintf(stderr, " failed while closing the statement\n");
fprintf(stderr, " %s\n", mysql_stmt_error(stmt));
exit(0);
}
20.6.10.12.
mysql_stmt_fetch_column()
int mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, unsigned int
column, unsigned long offset)
Description
Fetch one column from the current result set row.
bind
provides the buffer where data should be
placed. It should be set up the same way as for
mysql_stmt_bind_result()
.
column
indicates
which column to fetch. The first column is numbered 0.
offset
is the offset within the data value at
which to begin retrieving data. This can be used for fetching the data value in pieces. The beginning of
the value is offset 0.
Return Values
Zero if the value was fetched successfully. Nonzero if an error occurred.
Errors
•
CR_INVALID_PARAMETER_NO
[2944]
Invalid column number.
•
CR_NO_DATA
[2945]
The end of the result set has already been reached.
20.6.10.13.
mysql_stmt_field_count()
unsigned int mysql_stmt_field_count(MYSQL_STMT *stmt)
Description
Returns the number of columns for the most recent statement for the statement handler. This value is
zero for statements such as
INSERT
or
DELETE
that do not produce result sets.
mysql_stmt_field_count()
can be called after you have prepared a statement by invoking
mysql_stmt_prepare()
.
Return Values
An unsigned integer representing the number of columns in a result set.
Errors
None.
20.6.10.14.
mysql_stmt_free_result()
my_bool mysql_stmt_free_result(MYSQL_STMT *stmt)
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...