|
| __construct ($options) |
|
| __destruct () |
|
| connect () |
|
| disconnect () |
|
| escape ($text, $extra=false) |
|
| execute () |
|
| getOption ($key) |
|
| getConnectedQuery () |
|
| setOption ($key, $value) |
|
| connected () |
|
| getAffectedRows () |
|
| getNumRows ($cursor=null) |
|
| insertid () |
|
| select ($database) |
|
| setQuery ($query, $offset=null, $limit=null, $driverOptions=array()) |
|
| setUtf () |
|
| transactionCommit ($toSavepoint=false) |
|
| transactionRollback ($toSavepoint=false) |
|
| transactionStart ($asSavepoint=false) |
|
| loadNextObject ($class='stdClass') |
|
| loadNextAssoc () |
|
| loadNextRow () |
|
| __sleep () |
|
| __wakeup () |
|
| __call ($method, $args) |
|
| __construct ($options) |
|
| alterDbCharacterSet ($dbName) |
|
| alterTableCharacterSet ($tableName, $rethrow=false) |
|
| connect () |
|
| connected () |
|
| createDatabase ($options, $utf=true) |
|
| disconnect () |
|
| addDisconnectHandler ($callable) |
|
| dropTable ($table, $ifExists=true) |
|
| escape ($text, $extra=false) |
|
| getAffectedRows () |
|
| getAlterDbCharacterSet ($dbName) |
|
| getAlterTableCharacterSet ($tableName) |
|
| convertUtf8mb4QueryToUtf8 ($query) |
|
| getCollation () |
|
| getConnectionCollation () |
|
| getConnection () |
|
| getCount () |
|
| getDateFormat () |
|
| getLog () |
|
| getTimings () |
|
| getCallStacks () |
|
| getMinimum () |
|
| getNullDate () |
|
| getNumRows ($cursor=null) |
|
| getPrefix () |
|
| getExporter () |
|
| getImporter () |
|
| getName () |
|
| getServerType () |
|
| getQuery ($new=false) |
|
| getIterator ($column=null, $class='stdClass') |
|
| getTableColumns ($table, $typeOnly=true) |
|
| getTableCreate ($tables) |
|
| getTableKeys ($tables) |
|
| getTableList () |
|
| getUTFSupport () |
|
| hasUTFSupport () |
|
| hasUTF8mb4Support () |
|
| getVersion () |
|
| insertid () |
|
| insertObject ($table, &$object, $key=null) |
|
| isMinimumVersion () |
|
| loadAssoc () |
|
| loadAssocList ($key=null, $column=null) |
|
| loadColumn ($offset=0) |
|
| loadNextObject ($class='stdClass') |
|
| loadNextRow () |
|
| loadObject ($class='stdClass') |
|
| loadObjectList ($key='', $class='stdClass') |
|
| loadResult () |
|
| loadRow () |
|
| loadRowList ($key=null) |
|
| lockTable ($tableName) |
|
| quote ($text, $escape=true) |
|
| quoteName ($name, $as=null) |
|
| replacePrefix ($sql, $prefix='#__') |
|
| renameTable ($oldTable, $newTable, $backup=null, $prefix=null) |
|
| select ($database) |
|
| setDebug ($level) |
|
| setQuery ($query, $offset=0, $limit=0) |
|
| setUtf () |
|
| transactionCommit ($toSavepoint=false) |
|
| transactionRollback ($toSavepoint=false) |
|
| transactionStart ($asSavepoint=false) |
|
| truncateTable ($table) |
|
| updateObject ($table, &$object, $key, $nulls=false) |
|
| execute () |
|
| unlockTables () |
|
| query () |
|
| getErrorMsg ($escaped=false) |
|
| getErrorNum () |
|
| stderr ($showSQL=false) |
|
Joomla Platform PDO Database Driver Class
- Voir également
- http://php.net/pdo
- Depuis
- 12.1
◆ __construct()
Constructor.
- Paramètres
-
array | $options | List of options used to configure the connection |
- Depuis
- 12.1
Références $options.
◆ __destruct()
◆ __sleep()
PDO does not support serialize
- Renvoie
- array
- Depuis
- 12.3
◆ __wakeup()
Wake up after serialization
- Renvoie
- array
- Depuis
- 12.3
◆ connect()
Connects to the database if needed.
- Renvoie
- void Returns void if the database connected successfully.
- Depuis
- 12.1
- Exceptions
-
Références $format.
◆ connected()
Determines if the connection to the server is active.
- Renvoie
- boolean True if connected to the database engine.
- Depuis
- 12.1
Références $limit, $offset, et $query.
◆ disconnect()
Disconnects the database.
- Renvoie
- void
- Depuis
- 12.1
◆ escape()
escape |
( |
|
$text, |
|
|
|
$extra = false |
|
) |
| |
◆ execute()
Execute the SQL statement.
- Renvoie
- mixed A database cursor resource on success, boolean false on failure.
- Depuis
- 12.1
- Exceptions
-
RuntimeException | |
Exception | |
Références $key, $limit, $query, et null.
◆ fetchArray()
fetchArray |
( |
|
$cursor = null | ) |
|
|
protected |
Method to fetch a row from the result set cursor as an array.
- Paramètres
-
mixed | $cursor | The optional result set cursor from which to fetch the row. |
- Renvoie
- mixed Either the next row from the result set or false if there are no more rows.
- Depuis
- 12.1
◆ fetchAssoc()
fetchAssoc |
( |
|
$cursor = null | ) |
|
|
protected |
Method to fetch a row from the result set cursor as an associative array.
- Paramètres
-
mixed | $cursor | The optional result set cursor from which to fetch the row. |
- Renvoie
- mixed Either the next row from the result set or false if there are no more rows.
- Depuis
- 12.1
◆ fetchObject()
fetchObject |
( |
|
$cursor = null , |
|
|
|
$class = 'stdClass' |
|
) |
| |
|
protected |
Method to fetch a row from the result set cursor as an object.
- Paramètres
-
mixed | $cursor | The optional result set cursor from which to fetch the row. |
string | $class | Unused, only necessary so method signature will be the same as parent. |
- Renvoie
- mixed Either the next row from the result set or false if there are no more rows.
- Depuis
- 12.1
Références $class.
◆ freeResult()
freeResult |
( |
|
$cursor = null | ) |
|
|
protected |
Method to free up the memory used for the result set.
- Paramètres
-
mixed | $cursor | The optional result set cursor from which to fetch the row. |
- Renvoie
- void
- Depuis
- 12.1
Références null.
◆ getAffectedRows()
Get the number of affected rows for the previous executed SQL statement. Only applicable for DELETE, INSERT, or UPDATE statements.
- Renvoie
- integer The number of affected rows.
- Depuis
- 12.1
◆ getConnectedQuery()
Get a query to run and verify the database is operational.
- Renvoie
- string The query to check the health of the DB.
- Depuis
- 12.2
◆ getErrorMessage()
getErrorMessage |
( |
|
$query | ) |
|
|
protected |
Return the actual SQL Error message
- Paramètres
-
string | $query | The SQL Query that fails |
- Renvoie
- string The SQL Error message
- Depuis
- 3.4.6
◆ getErrorNumber()
Return the actual SQL Error number
- Renvoie
- integer The SQL Error number
- Depuis
- 3.4.6
◆ getNumRows()
getNumRows |
( |
|
$cursor = null | ) |
|
Get the number of returned rows for the previous executed SQL statement. Only applicable for DELETE, INSERT, or UPDATE statements.
- Paramètres
-
resource | $cursor | An optional database cursor resource to extract the row count from. |
- Renvoie
- integer The number of returned rows.
- Depuis
- 12.1
Références elseif.
◆ getOption()
◆ insertid()
Method to get the auto-incremented value from the last INSERT statement.
- Renvoie
- string The value of the auto-increment field from the last inserted row.
- Depuis
- 12.1
◆ isSupported()
Test to see if the PDO extension is available. Override as needed to check for specific PDO Drivers.
- Renvoie
- boolean True on success, false otherwise.
- Depuis
- 12.1
Implémente JDatabaseInterface.
◆ loadNextAssoc()
Method to get the next row in the result set from the database query as an array.
- Renvoie
- mixed The result of the query as an array, false if there are no more rows.
- Depuis
- 12.1
- Exceptions
-
Références $row, et null.
◆ loadNextObject()
loadNextObject |
( |
|
$class = 'stdClass' | ) |
|
Method to get the next row in the result set from the database query as an object.
- Paramètres
-
string | $class | The class name to use for the returned row object. |
- Renvoie
- mixed The result of the query as an array, false if there are no more rows.
- Depuis
- 12.1
- Exceptions
-
- Obsolète:
- 4.0 (CMS) Use getIterator() instead
Références $class, $row, et null.
◆ loadNextRow()
Method to get the next row in the result set from the database query as an array.
- Renvoie
- mixed The result of the query as an array, false if there are no more rows.
- Depuis
- 12.1
- Exceptions
-
- Obsolète:
- 4.0 (CMS) Use getIterator() instead
Références $row, et null.
◆ select()
Select a database for use.
- Paramètres
-
string | $database | The name of the database to select for use. |
- Renvoie
- boolean True if the database was successfully selected.
- Depuis
- 12.1
- Exceptions
-
◆ setOption()
setOption |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
Sets an attribute on the PDO database handle. http://www.php.net/manual/en/pdo.setattribute.php
Usage: $db->setOption(PDO::ATTR_CASE, PDO::CASE_UPPER);
- Paramètres
-
integer | $key | One of the PDO::ATTR_* Constants |
mixed | $value | One of the associated PDO Constants related to the particular attribute key. |
- Renvoie
- boolean
- Depuis
- 12.1
Références $key, et $value.
◆ setQuery()
setQuery |
( |
|
$query, |
|
|
|
$offset = null , |
|
|
|
$limit = null , |
|
|
|
$driverOptions = array() |
|
) |
| |
Sets the SQL statement string for later execution.
- Paramètres
-
mixed | $query | The SQL statement to set either as a FOFDatabaseQuery object or a string. |
integer | $offset | The affected row offset to set. |
integer | $limit | The maximum affected rows to set. |
array | $driverOptions | The optional PDO driver options. |
- Renvoie
- FOFDatabaseDriver This object to support method chaining.
- Depuis
- 12.1
Références $limit, $offset, et $query.
◆ setUtf()
Set the connection to use UTF-8 character encoding.
- Renvoie
- boolean True on success.
- Depuis
- 12.1
◆ transactionCommit()
transactionCommit |
( |
|
$toSavepoint = false | ) |
|
Method to commit a transaction.
- Paramètres
-
boolean | $toSavepoint | If true, commit to the last savepoint. |
- Renvoie
- void
- Depuis
- 12.1
- Exceptions
-
◆ transactionRollback()
transactionRollback |
( |
|
$toSavepoint = false | ) |
|
Method to roll back a transaction.
- Paramètres
-
boolean | $toSavepoint | If true, rollback to the last savepoint. |
- Renvoie
- void
- Depuis
- 12.1
- Exceptions
-
◆ transactionStart()
transactionStart |
( |
|
$asSavepoint = false | ) |
|
Method to initialize a transaction.
- Paramètres
-
boolean | $asSavepoint | If true and a transaction is already active, a savepoint will be created. |
- Renvoie
- void
- Depuis
- 12.1
- Exceptions
-
◆ $connection
◆ $executed
◆ $name
◆ $nameQuote
◆ $nullDate
$nullDate = '0000-00-00 00:00:00' |
|
protected |
◆ $prepared
La documentation de cette classe a été générée à partir du fichier suivant :