Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques statiques | |
static | isSupported () |
Fonctions membres publiques statiques hérités de JDatabaseDriverMysqli | |
static | isSupported () |
Fonctions membres publiques statiques hérités de JDatabaseDriver | |
static | getConnectors () |
static | getInstance ($options=array()) |
static | splitSql ($sql) |
Fonctions membres publiques statiques hérités de JDatabase | |
static | getConnectors () |
static | getInstance ($options=array()) |
static | splitSql ($query) |
static | test () |
Champs de données | |
$name = 'mysql' | |
Champs de données hérités de JDatabaseDriverMysqli | |
$name = 'mysqli' | |
$serverType = 'mysql' | |
Champs de données hérités de JDatabaseDriver | |
$name | |
$serverType | |
Fonctions membres protégées | |
fetchArray ($cursor=null) | |
fetchAssoc ($cursor=null) | |
fetchObject ($cursor=null, $class='stdClass') | |
freeResult ($cursor=null) | |
getErrorNumber () | |
getErrorMessage () | |
Fonctions membres protégées hérités de JDatabaseDriverMysqli | |
fetchArray ($cursor=null) | |
fetchAssoc ($cursor=null) | |
fetchObject ($cursor=null, $class='stdClass') | |
freeResult ($cursor=null) | |
getErrorNumber () | |
getErrorMessage () | |
Fonctions membres protégées hérités de JDatabaseDriver | |
fetchArray ($cursor=null) | |
fetchAssoc ($cursor=null) | |
fetchObject ($cursor=null, $class='stdClass') | |
freeResult ($cursor=null) | |
getCreateDatabaseQuery ($options, $utf) | |
getDatabase () | |
quoteNameStr ($strArr) | |
Fonctions membres privées | |
hasProfiling () | |
hasQueryCacheEnabled () | |
serverClaimsUtf8mb4Support () | |
Membres hérités additionnels | |
Attributs protégés hérités de JDatabaseDriverMysqli | |
$connection | |
$nameQuote = '`' | |
$nullDate = '0000-00-00 00:00:00' | |
Attributs protégés hérités de JDatabaseDriver | |
$connection | |
$count = 0 | |
$cursor | |
$debug = false | |
$limit = 0 | |
$log = array() | |
$timings = array() | |
$callStacks = array() | |
$nameQuote | |
$nullDate | |
$offset = 0 | |
$options | |
$sql | |
$tablePrefix | |
$utf = true | |
$utf8mb4 = false | |
$errorNum = 0 | |
$errorMsg | |
$transactionDepth = 0 | |
$disconnectHandlers = array() | |
Attributs protégés statiques hérités de JDatabaseDriverMysqli | |
static | $dbMinimum = '5.0.4' |
Attributs protégés statiques hérités de JDatabaseDriver | |
static | $instances = array() |
static | $dbMinimum |
MySQL database driver
__construct | ( | $options | ) |
Constructor.
array | $options | Array of database options with keys: host, user, password, database, select. |
Références $options.
connect | ( | ) |
Connects to the database if needed.
RuntimeException |
connected | ( | ) |
Determines if the connection to the server is active.
disconnect | ( | ) |
escape | ( | $text, | |
$extra = false |
|||
) |
Method to escape a string for usage in an SQL statement.
string | $text | The string to be escaped. |
boolean | $extra | Optional parameter to provide extra escaping. |
Références $text.
execute | ( | ) |
|
protected |
Method to fetch a row from the result set cursor as an array.
mixed | $cursor | The optional result set cursor from which to fetch the row. |
|
protected |
Method to fetch a row from the result set cursor as an associative array.
mixed | $cursor | The optional result set cursor from which to fetch the row. |
|
protected |
Method to fetch a row from the result set cursor as an object.
mixed | $cursor | The optional result set cursor from which to fetch the row. |
string | $class | The class name to use for the returned row object. |
Références $class.
|
protected |
Method to free up the memory used for the result set.
mixed | $cursor | The optional result set cursor from which to fetch the row. |
getAffectedRows | ( | ) |
Get the number of affected rows by the last INSERT, UPDATE, REPLACE or DELETE for the previous executed SQL statement.
|
protected |
Return the actual SQL Error message
|
protected |
Return the actual SQL Error number
getNumRows | ( | $cursor = null | ) |
Get the number of returned rows for the previous executed SQL statement. This command is only valid for statements like SELECT or SHOW that return an actual result set. To retrieve the number of rows affected by an INSERT, UPDATE, REPLACE or DELETE query, use getAffectedRows().
resource | $cursor | An optional database cursor resource to extract the row count from. |
getVersion | ( | ) |
Get the version of the database connector.
|
private |
|
private |
insertid | ( | ) |
Method to get the auto-incremented value from the last INSERT statement.
|
static |
Test to see if the MySQL connector is available.
Implémente JDatabaseInterface.
select | ( | $database | ) |
Select a database for use.
string | $database | The name of the database to select for use. |
RuntimeException |
|
private |
Does the database server claim to have support for UTF-8 Multibyte (utf8mb4) collation?
libmysql supports utf8mb4 since 5.5.3 (same version as the MySQL server). mysqlnd supports utf8mb4 since 5.0.9.
setUtf | ( | ) |
Set the connection to use UTF-8 character encoding.
If I could not set the utf8mb4 charset then 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!
$name = 'mysql' |