( mysql_stmt_prepare

Info Catalog ( mysql_stmt_param_metadata ( C API Prepared statement functions ( mysql_stmt_reset `mysql_stmt_prepare()'
 `int mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned
 long length)'
 Given the statement handle returned by `mysql_stmt_init()', prepares
 the SQL statement pointed to by the string `query' and returns a status
 value.  The string length should be given by the `length' argument.
 The string 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),
 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 Definition Language (DDL) statements.
 The parameter markers must be bound to application variables using
 `mysql_stmt_bind_param()' before executing the statement.
 This function was added in MySQL 4.1.2.
 Return Values
 Zero if the statement was prepared successfully.  Non-zero if an error
      Commands were executed in an improper order.
      Out of memory.
      The MySQL server has gone away.
      The connection to the server was lost during the query
      An unknown error occurred.
 If the prepare operation was unsuccessful (that is,
 `mysql_stmt_prepare()' returns non-zero), the error message can be
 obtained by calling `mysql_stmt_error()'.
 For the usage of `mysql_stmt_prepare()', refer to the Example from
  `mysql_stmt_execute()' mysql_stmt_execute.
Info Catalog ( mysql_stmt_param_metadata ( C API Prepared statement functions ( mysql_stmt_reset
automatically generated byinfo2html