DB::prepare()

DB::prepare() -- Prepares a query for multiple execution with execute().

Description

resource prepare (string $query)

Prepare() requires a generic query as string like "INSERT INTO numbers VALUES(?,?,?)". The ? are wildcards. Types of wildcards:

? - a quoted scalar value, i.e. strings, integers
& - requires a file name, the content of the file insert into the query (i.e. saving binary data in a db).
! - value is inserted 'as is'

See "Execute"-section for further information.

Parameter

Returns