prepared Statement
Creates a statement from the given SQL statement, runs the block, commits the changes and closes the connection.
The returned keys are accessible using getGeneratedKeys.
If all connections are used, this function suspends until a connection is available.
The block should always be short-lived, consider using transactional otherwise.
Supports nesting, but it is not recommended doing so, avoid nesting by returning the data as soon as possible.
Parameters
An SQL statement that may contain one or more '?' IN parameter placeholders
true
if the database only is read from, can allow some optimizations but does not prevent writing
true
to return the generated keys
See also
Creates a statement from the given SQL statement, runs the block, commits the changes and closes the connection.
The returned keys are accessible using getGeneratedKeys.
If all connections are used, this function suspends until a connection is available.
The block should always be short-lived, consider using transactional otherwise.
Supports nesting, but it is not recommended doing so, avoid nesting by returning the data as soon as possible.
Parameters
An SQL statement that may contain one or more '?' IN parameter placeholders
true
if the database only is read from, can allow some optimizations but does not prevent writing
An array of column indexes indicating the columns that should be returned from the inserted row or rows
See also
Creates a statement from the given SQL statement, runs the block, commits the changes and closes the connection.
The returned keys are accessible using getGeneratedKeys.
If all connections are used, this function suspends until a connection is available.
The block should always be short-lived, consider using transactional otherwise.
Supports nesting, but it is not recommended doing so, avoid nesting by returning the data as soon as possible.
Parameters
An SQL statement that may contain one or more '?' IN parameter placeholders
true
if the database only is read from, can allow some optimizations but does not prevent writing
An array of column names indicating the columns that should be returned from the inserted row or rows