|
PHP5中文手册
maxdb_stmt_preparestmt->prepare(No version information available, might be only in CVS) stmt->prepare — Prepare a SQL statement for execution 说明Procedure style:
bool maxdb_stmt_prepare
( resource $stmt
, string $query
)
Object oriented style (method) stmt
mixed
prepare
( string $query
)
maxdb_stmt_prepare() prepares the SQL query pointed to by the null-terminated string query. The statement resource has to be allocated by maxdb_stmt_init(). The query must consist of a single SQL statement.
The parameter query can include one or more parameter markers in the SQL statement by embedding question mark (?) characters at the appropriate positions.
The parameter markers must be bound to application variables using maxdb_stmt_bind_param() and/or maxdb_stmt_bind_result() before executing the statement or fetching rows. 返回值如果成功则返回 TRUE,失败则返回 FALSE。 范例Example#1 Object oriented style
<?php Example#2 Procedural style
<?php The above examples would produce the following output:
|