|
| | quote ($value, $type=NULL) |
| |
| | exec ($statement) |
| |
| | query ($statement, $mode=NULL, $arg1=NULL, $arg2=NULL) |
| |
| | prepare ($statement, $driver_options=array()) |
| |
| | prepareStatement ($statement, $driver_options=array()) |
| |
This is a special variant of the standard PDO class that does not allow multiple statement execution.
◆ exec()
Executes an SQL statement and returns the number of affected rows.
- Parameters
-
- Returns
- int number of affected rows
◆ prepare()
| prepare |
( |
|
$statement, |
|
|
|
$driver_options = array() |
|
) |
| |
Prepares a statement for execution and returns a statement object.
- Parameters
-
- Returns
- object PDOStatement object
◆ prepareStatement()
| prepareStatement |
( |
|
$statement, |
|
|
|
$driver_options = array() |
|
) |
| |
This method is intended only for use by the StudipPDOStatement class.
- Parameters
-
- Returns
- object PDOStatement object
◆ query()
| query |
( |
|
$statement, |
|
|
|
$mode = NULL, |
|
|
|
$arg1 = NULL, |
|
|
|
$arg2 = NULL |
|
) |
| |
Executes an SQL statement, returning a result set as a statement object.
- Parameters
-
| string | SQL statement |
| int | fetch mode (optional) |
| mixed | fetch mode parameter (see PDOStatement::setFetchMode) |
| mixed | fetch mode parameter (see PDOStatement::setFetchMode) |
- Returns
- object PDOStatement object
◆ quote()
| quote |
( |
|
$value, |
|
|
|
$type = NULL |
|
) |
| |
Quotes the given value in a form appropriate for the type. If no explicit type is given, the value's PHP type is used.
- Parameters
-
| string | PHP value to quote |
| int | parameter type (e.g. PDO::PARAM_STR) |
- Returns
- string quoted SQL string
◆ replaceStrings()
| static replaceStrings |
( |
|
$statement | ) |
|
|
staticprotected |
Replaces all string literals in the statement with placeholders.
- Parameters
-
- Returns
- string modified SQL statement
◆ verify()
Verifies that the given SQL query only contains a single statement.
- Parameters
-
| string | SQL statement to check |
- Exceptions
-
| PDOException | when the query contains multiple statements |
◆ PARAM_ARRAY
◆ PARAM_COLUMN
The documentation for this class was generated from the following file: