mysql_stmt_param_metadata() <<< |
mysql_stmt_prepare() | mysql_stmt_send_long_data() >>> |
21.2.7 Descriptions des fonctions C pour les requêtes préparées 21.2 API MySQL C 21 API MySQL Manuel de Référence MySQL 4.1 : Version Française . mysql_stmt_init() . mysql_stmt_bind_param() . mysql_stmt_bind_result() . mysql_stmt_execute() . mysql_stmt_fetch() . mysql_stmt_fetch_column() . mysql_stmt_result_metadata() . mysql_stmt_param_count() . mysql_stmt_param_metadata() ->mysql_stmt_prepare() . mysql_stmt_send_long_data() . mysql_stmt_affected_rows() . mysql_stmt_insert_id() . mysql_stmt_close() . mysql_stmt_data_seek() . mysql_stmt_errno() . mysql_stmt_error() . mysql_stmt_free_result() . mysql_stmt_num_rows() . mysql_stmt_reset() . mysql_stmt_row_seek() . mysql_stmt_row_tell() . mysql_stmt_sqlstate() . mysql_stmt_store_result() . mysql_stmt_attr_set() . mysql_stmt_attr_get() |
21.2.7.10 mysql_stmt_prepare()
int mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length) DescriptionPrepares the SQL query pointed to by the null-terminated string query , and returns a statement handle to be used for further operations on the statement. The query must consist of a single SQL statement. You should not add a terminating semicolon ( ';' ) or \g to the statement. The application can include one or more parameter markers in the SQL statement by embedding question mark ( '?' ) characters into the SQL string at the appropriate positions.The markers are legal only in certain places in SQL statements. For example, they are allowed in the VALUES() list of an INSERT statement (to specify column values for a row), or in a comparison with a column in a WHERE clause to specify a comparison value. However, they are not allowed for identifiers (such as table or column names), in the select list that names the columns to be returned by a SELECT statement), or to specify both operands of a binary operator such as the = equal sign. The latter restriction is necessary because it would be impossible to determine the parameter type. In general, parameters are legal only in Data Manipulation Languange (DML) statements, and not in Data Defination Language (DDL) statements. The parameter markers must be bound to application variables using mysql_stmt_bind_param() before executing the statement.Return Values Errors
Example For the usage of mysql_stmt_prepare() , refer to the Example from . |
<< | mysql_stmt_prepare() | >> |
mysql_stmt_param_metadata() | Descriptions des fonctions C pour les requêtes préparées | mysql_stmt_send_long_data() |