
Druckansicht von http://www.php-homepage.de/manual/function.mysqli-prepare.php
mysqli_preparemysqli->prepare()(PHP 5) mysqli->prepare() — Prepare a SQL statement for execution BeschreibungProcedure style:
mysqli_stmt mysqli_prepare
( mysqli $link
, string $query
)
Object oriented style (method) mysqli
mysqli_stmt prepare
( string $query
)
Prepares 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. The parameter markers must be bound to application variables using mysqli_stmt_bind_param() and/or mysqli_stmt_bind_result() before executing the statement or fetching rows. Parameter Liste
Rückgabewertemysqli_prepare() returns a statement object or FALSE if an error occured. BeispieleExample#1 Object oriented style
<?phpExample#2 Procedural style
<?phpDas oben gezeigte Beispiel erzeugt folgende Ausgabe:
|