void autoCommit(
bool
$mode
)
|
|
Sets auto-commit mode on this database connection.
Parameters:
|
bool |
$mode: |
True if auto-commit is to be used; false if not. |
Starts a transaction on this connection, if supported.
Commits a transaction on this connection, if supported.
array getAll(
string
$sql, [array
$params = array()]
)
|
|
Run an SQL query with the specified parameters, if any.
Parameters:
|
string |
$sql: |
An SQL string with placeholders. The placeholders are assumed to be specific to the database engine for this connection. |
|
array |
$params: |
An array of parameters to insert into the SQL string using this connection's escaping mechanism. |
API Tags:
| Return: | An array of arrays representing the result of the query; each array is keyed on column name. |
mixed getOne(
string
$sql, [array
$params = array()]
)
|
|
Run an SQL query and return the first column of the first row of the result set, if any.
Parameters:
|
string |
$sql: |
An SQL string with placeholders. The placeholders are assumed to be specific to the database engine for this connection. |
|
array |
$params: |
An array of parameters to insert into the SQL string using this connection's escaping mechanism. |
API Tags:
| Return: | The value of the first column of the first row of the result set. False if no such result was found. |
array getRow(
string
$sql, [array
$params = array()]
)
|
|
Run an SQL query and return the first row of the result set, if any.
Parameters:
|
string |
$sql: |
An SQL string with placeholders. The placeholders are assumed to be specific to the database engine for this connection. |
|
array |
$params: |
An array of parameters to insert into the SQL string using this connection's escaping mechanism. |
API Tags:
| Return: | The first row of the result set, if any, keyed on column name. False if no such result was found. |
mixed query(
string
$sql, [array
$params = array()]
)
|
|
Run an SQL query with the specified parameters, if any.
Parameters:
|
string |
$sql: |
An SQL string with placeholders. The placeholders are assumed to be specific to the database engine for this connection. |
|
array |
$params: |
An array of parameters to insert into the SQL string using this connection's escaping mechanism. |
API Tags:
| Return: | The result of calling this connection's internal query function. The type of result depends on the underlying database engine. This method is usually used when the result of a query is not important, like a DDL query. |
Performs a rollback on this connection, if supported.