JDatabaseMySQL
MySQL database driver
Located in /libraries/joomla/database/database/mysql.php (line 24)
JDatabase
![]()
JDatabaseMySQL (Subpackage Database)
| Class | Description |
|---|---|
JDatabaseMySQLi
|
MySQLi database driver |
JDatabase
renameTable
(string $oldTable, string $newTable, [string $backup = null], [string $prefix = null])
string
$name
= 'mysql' (line 32)
The name of the database driver.
- JDatabase::$name
- The name of the database driver.
- JDatabaseMySQLi::$name : The name of the database driver.
string
$nameQuote
= '`' (line 43)
The character(s) used to quote SQL statement names such as table names or field names, etc. The child classes should define this as necessary. If a single character string the same character is used for both sides of the quoted name, else the first character will be used for the opening quote and the second for the closing quote.
string
$nullDate
= '0000-00-00 00:00:00' (line 52)
The null or zero representation of a timestamp for the database driver. This should be defined in child classes to hold the appropriate value for the engine.
Inherited Variables
Inherited from JDatabase
JDatabase::$connection
JDatabase::$count
JDatabase::$cursor
JDatabase::$debug
JDatabase::$errorMsg
JDatabase::$errorNum
JDatabase::$hasQuoted
JDatabase::$instances
JDatabase::$limit
JDatabase::$log
JDatabase::$offset
JDatabase::$quoted
JDatabase::$sql
JDatabase::$tablePrefix
JDatabase::$utf
Constructor.
- array $options: Array of database options with keys: host, user, password, database, select.
- JDatabase::__construct()
- Constructor.
- JDatabaseMySQLi::__construct() : Constructor.
Destructor.
- JDatabaseMySQLi::__destruct() : Destructor.
Determines if the connection to the server is active.
- JDatabase::connected()
- Determines if the connection to the server is active.
- JDatabaseMySQLi::connected() : Determines if the connection to the server is active.
Drops a table from the database.
- string $tableName: The name of the database table to drop.
- boolean $ifExists: Optionally specify that the table must exist before it is dropped.
- JDatabase::dropTable()
- Drops a table from the database.
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.
- JDatabase::escape()
- Method to escape a string for usage in an SQL statement.
- JDatabaseMySQLi::escape() : Method to escape a string for usage in an SQL statement.
Diagnostic method to return explain information for a query.
- JDatabase::explain()
- Diagnostic method to return explain information for a query.
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.
- JDatabase::fetchArray()
- Method to fetch a row from the result set cursor as an array.
- JDatabaseMySQLi::fetchArray() : Method to fetch a row from the result set cursor as an array.
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.
- JDatabase::fetchAssoc()
- Method to fetch a row from the result set cursor as an associative array.
- JDatabaseMySQLi::fetchAssoc() : Method to fetch a row from the result set cursor as an associative array.
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.
- JDatabase::fetchObject()
- Method to fetch a row from the result set cursor as an object.
- JDatabaseMySQLi::fetchObject() : Method to fetch a row from the result set cursor as an object.
Method to free up the memory used for the result set.
- mixed $cursor: The optional result set cursor from which to fetch the row.
- JDatabase::freeResult()
- Method to free up the memory used for the result set.
- JDatabaseMySQLi::freeResult() : Method to free up the memory used for the result set.
Get the number of affected rows for the previous executed SQL statement.
- JDatabase::getAffectedRows()
- Get the number of affected rows for the previous executed SQL statement.
- JDatabaseMySQLi::getAffectedRows() : Get the number of affected rows for the previous executed SQL statement.
Method to get the database collation in use by sampling a text field of a table in the database.
- JDatabase::getCollation()
- Method to get the database collation in use by sampling a text field of a table in the database.
Gets an exporter class object.
- JDatabaseMySQLi::getExporter() : Gets an exporter class object.
Gets an importer class object.
- JDatabaseMySQLi::getImporter() : Gets an importer class object.
Get the number of returned rows for the previous executed SQL statement.
- resource $cursor: An optional database cursor resource to extract the row count from.
- JDatabase::getNumRows()
- Get the number of returned rows for the previous executed SQL statement.
- JDatabaseMySQLi::getNumRows() : Get the number of returned rows for the previous executed SQL statement.
Get the current or query, or new JDatabaseQuery object.
- boolean $new: False to return the last query set, True to return a new JDatabaseQuery object.
- JDatabase::getQuery()
- Get the current query object or a new JDatabaseQuery object.
- JDatabaseMySQLi::getQuery() : Get the current or query, or new JDatabaseQuery object.
Retrieves field information about a given table.
- string $table: The name of the database table.
- boolean $typeOnly: True to only return field types.
- JDatabase::getTableColumns()
- Retrieves field information about the given tables.
Shows the table CREATE statement that creates the given tables.
- mixed $tables: A table name or a list of table names.
- JDatabase::getTableCreate()
- Shows the table CREATE statement that creates the given tables.
Get the details list of keys for a table.
- string $table: The name of the table.
- JDatabase::getTableKeys()
- Retrieves field information about the given tables.
Method to get an array of all tables in the database.
- JDatabase::getTableList()
- Method to get an array of all tables in the database.
Get the version of the database connector.
- JDatabase::getVersion()
- Get the version of the database connector
- JDatabaseMySQLi::getVersion() : Get the version of the database connector.
Determines if the database engine supports UTF-8 character encoding.
- JDatabase::hasUTF()
- Determines if the database engine supports UTF-8 character encoding.
- JDatabaseMySQLi::hasUTF() : Determines if the database engine supports UTF-8 character encoding.
Method to get the auto-incremented value from the last INSERT statement.
- JDatabase::insertid()
- Method to get the auto-incremented value from the last INSERT statement.
- JDatabaseMySQLi::insertid() : Method to get the auto-incremented value from the last INSERT statement.
Locks a table in the database.
- string $table: The name of the table to unlock.
- JDatabase::lockTable()
- Locks a table in the database.
Execute the SQL statement.
- JDatabase::query()
- Execute the SQL statement.
- JDatabaseMySQLi::query() : Execute the SQL statement.
Execute a query batch.
- boolean $abortOnError: Abort on error.
- boolean $transactionSafe: Transaction safe queries.
- JDatabase::queryBatch()
- Execute a query batch.
- JDatabaseMySQLi::queryBatch() : Execute a query batch.
Renames a table in the database.
- string $oldTable: The name of the table to be renamed
- string $newTable: The new name for the table.
- string $backup: Not used by MySQL.
- string $prefix: Not used by MySQL.
- JDatabase::renameTable()
- Renames a table in the database.
Select a database for use.
- string $database: The name of the database to select for use.
- JDatabase::select()
- Select a database for use.
- JDatabaseMySQLi::select() : Select a database for use.
Set the connection to use UTF-8 character encoding.
- JDatabase::setUTF()
- Set the connection to use UTF-8 character encoding.
- JDatabaseMySQLi::setUTF() : Set the connection to use UTF-8 character encoding.
Test to see if the MySQL connector is available.
- JDatabaseMySQLi::test() : Test to see if the MySQL connector is available.
Method to commit a transaction.
- JDatabase::transactionCommit()
- Method to commit a transaction.
Method to roll back a transaction.
- JDatabase::transactionRollback()
- Method to roll back a transaction.
Method to initialize a transaction.
- JDatabase::transactionStart()
- Method to initialize a transaction.
Unlocks tables in the database.
- JDatabase::unlockTables()
- Unlocks tables in the database.
Inherited Methods
Inherited From JDatabase
JDatabase::__construct()
JDatabase::addQuoted()
JDatabase::connected()
JDatabase::debug()
JDatabase::dropTable()
JDatabase::escape()
JDatabase::explain()
JDatabase::fetchArray()
JDatabase::fetchAssoc()
JDatabase::fetchObject()
JDatabase::freeResult()
JDatabase::getAffectedRows()
JDatabase::getCollation()
JDatabase::getConnection()
JDatabase::getConnectors()
JDatabase::getCount()
JDatabase::getDatabase()
JDatabase::getDateFormat()
JDatabase::getErrorMsg()
JDatabase::getErrorNum()
JDatabase::getEscaped()
JDatabase::getInstance()
JDatabase::getLog()
JDatabase::getNullDate()
JDatabase::getNumRows()
JDatabase::getPrefix()
JDatabase::getQuery()
JDatabase::getTableColumns()
JDatabase::getTableCreate()
JDatabase::getTableFields()
JDatabase::getTableKeys()
JDatabase::getTableList()
JDatabase::getTicker()
JDatabase::getUTFSupport()
JDatabase::getVersion()
JDatabase::hasUTF()
JDatabase::insertid()
JDatabase::insertObject()
JDatabase::isQuoted()
JDatabase::loadAssoc()
JDatabase::loadAssocList()
JDatabase::loadColumn()
JDatabase::loadNextObject()
JDatabase::loadNextRow()
JDatabase::loadObject()
JDatabase::loadObjectList()
JDatabase::loadResult()
JDatabase::loadResultArray()
JDatabase::loadRow()
JDatabase::loadRowList()
JDatabase::lockTable()
JDatabase::nameQuote()
JDatabase::query()
JDatabase::queryBatch()
JDatabase::quote()
JDatabase::quoteName()
JDatabase::quoteNameStr()
JDatabase::renameTable()
JDatabase::replacePrefix()
JDatabase::select()
JDatabase::setDebug()
JDatabase::setQuery()
JDatabase::setUTF()
JDatabase::splitSql()
JDatabase::stderr()
JDatabase::transactionCommit()
JDatabase::transactionRollback()
JDatabase::transactionStart()
JDatabase::truncateTable()
JDatabase::unlockTables()
JDatabase::updateObject()
JDatabase::__call()

JDatabaseMySQL (Subpackage Database)
static