|
| __construct ($options) |
|
| connect () |
|
| dropTable ($tableName, $ifExists=true) |
|
| select ($database) |
|
| getCollation () |
|
| getConnectionCollation () |
|
| getTableCreate ($tables) |
|
| getTableColumns ($table, $typeOnly=true) |
|
| getTableKeys ($table) |
|
| getTableList () |
|
| getVersion () |
|
| lockTable ($table) |
|
| renameTable ($oldTable, $newTable, $backup=null, $prefix=null) |
|
| escape ($text, $extra=false) |
|
| unlockTables () |
|
| transactionCommit ($toSavepoint=false) |
|
| transactionRollback ($toSavepoint=false) |
|
| transactionStart ($asSavepoint=false) |
|
| __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) |
|
Connects to the database if needed.
- Renvoie
- void Returns void if the database connected successfully.
- Depuis
- 3.4
- Exceptions
-
If the connection failed and I was trying to use the utf8mb4 charset then it is likely that the server doesn't support utf8mb4 despite claiming otherwise.
This happens on old MySQL server versions (less than 5.5.3) using the mysqlnd PHP driver. Since mysqlnd masks the server version and reports only its own we can not be sure if the server actually does support UTF-8 Multibyte (i.e. it's MySQL 5.5.3 or later). Since the utf8mb4 charset is undefined in this case we catch the error and determine that utf8mb4 is not supported!