Prepares a query for multiple execution with execute().
With some database backends, this is emulated. prepare() requires a generic query as string like 'INSERT INTO numbers VALUES(?,?)' or 'INSERT INTO numbers VALUES(:foo,:bar)'. The ? and :[a-zA-Z] and are placeholders which can be set using bindParam() and the query can be send off using the execute() method.
Return: resource handle for the prepared query on success, a MDB2 error on failure
See: bindParam, execute
Access: public
Parameters:
string
$query
—
the query to prepare
mixed
$types
—
array that contains the types of the placeholders
mixed
$result_types
—
array that contains the types of the columns in the result set