JDatabase
Database connector class
Located in /joomla/database/database.php (line 26)
JObject (Subpackage Base)
![]()
JDatabase (Subpackage Database)
| Class | Description |
|---|---|
JDatabaseMySQLi
|
MySQLi database driver |
JDatabaseMySQL
|
MySQL database driver |
string
$name
= '' (line 33)
The database driver name
- JDatabaseMySQLi::$name : The database driver name
- JDatabaseMySQL::$name : The database driver name
resource
$_cursor
= null (line 75)
The last query cursor
boolean
$_debug
= 0 (line 82)
Debug option
string
$_errorMsg
= '' (line 54)
The database error message
int
$_errorNum
= 0 (line 47)
The database error number
bool
$_hasQuoted
= null (line 148)
Legacy compatibility
int
$_limit
= 0 (line 89)
The limit for the query
array
$_log
= null (line 110)
A log of queries
string
$_nameQuote
= null (line 124)
Quote for named objects
- JDatabaseMySQLi::$_nameQuote : Quote for named objects
- JDatabaseMySQL::$_nameQuote : Quote for named objects
string
$_nullDate
= null (line 117)
The null/zero date string
- JDatabaseMySQLi::$_nullDate : The null/zero date string
- JDatabaseMySQL::$_nullDate : The null/zero date string
int
$_offset
= 0 (line 96)
The for offset for the limit
array
$_quoted
= null (line 140)
The fields that are to be quote
resource
$_resource
= '' (line 68)
The connector resource
string
$_sql
= '' (line 40)
The query sql string
string
$_table_prefix
= '' (line 61)
The prefix used on all database tables
int
$_ticker
= 0 (line 103)
The number of queries performed by the object instance
boolean
$_utf
= 0 (line 132)
UTF-8 support
Inherited Variables
Inherited from JObject
JObject::$_errors
Database object constructor
- array $options: List of options used to configure the connection
- JObject::__construct()
- Class constructor, overridden in descendant classes.
- JDatabaseMySQLi::__construct() : Database object constructor
- JDatabaseMySQL::__construct() : Database object constructor
Adds a field or array of field names to the list that are to be quoted
- mixed $quoted: Field name or array of names
Determines if the connection to the server is active.
- JDatabaseMySQLi::connected() : Determines if the connection to the server is active.
- JDatabaseMySQL::connected() : Determines if the connection to the server is active.
Diagnostic function
- JDatabaseMySQLi::explain() : Diagnostic function
- JDatabaseMySQL::explain() : Diagnostic function
ADODB compatability function
- $foo1
- $foo2
Get the affected rows by the most recent query
- JDatabaseMySQLi::getAffectedRows() : Description
- JDatabaseMySQL::getAffectedRows() : Description
Get the database collation
- JDatabaseMySQLi::getCollation() : Assumes database collation in use by sampling one text field in one table
- JDatabaseMySQL::getCollation() : Assumes database collation in use by sampling one text field in one table
Get a database escaped string
- string $text: The string to be escaped
- boolean $extra: Optional parameter to provide extra escaping
- JDatabaseMySQLi::getEscaped() : Get a database escaped string
- JDatabaseMySQL::getEscaped() : Get a database escaped string
Returns a reference to the global Database object, only creating it if it doesn't already exist.
The 'driver' entry in the parameters array specifies the database driver to be used (defaults to 'mysql' if omitted). All other parameters are database driver dependent.
- array $options: Parameters to be passed to the database driver
Get the number of rows returned by the most recent query
- object Database $cur: resource
- JDatabaseMySQLi::getNumRows() : Description
- JDatabaseMySQL::getNumRows() : Description
Shows the CREATE TABLE statement that creates the given tables
- array|string $tables: A table name or a list of table names
- JDatabaseMySQLi::getTableCreate() : Shows the CREATE TABLE statement that creates the given tables
- JDatabaseMySQL::getTableCreate() : Shows the CREATE TABLE statement that creates the given tables
Retrieves information about the given tables
- array|string $tables: A table name or a list of table names
- boolean $typeonly: Only return field types, default true
- JDatabaseMySQLi::getTableFields() : Retrieves information about the given tables
- JDatabaseMySQL::getTableFields() : Retrieves information about the given tables
List tables in a database
- JDatabaseMySQLi::getTableList() : Description
- JDatabaseMySQL::getTableList() : Description
Get the version of the database connector
- JDatabaseMySQLi::getVersion() : Description
- JDatabaseMySQL::getVersion() : Description
Determines UTF support
- JDatabaseMySQLi::hasUTF() : Determines UTF support
- JDatabaseMySQL::hasUTF() : Determines UTF support
Get the ID generated from the previous INSERT operation
- JDatabaseMySQLi::insertid() : Description
- JDatabaseMySQL::insertid() : Description
Inserts a row into a table based on an objects properties
- string $table: The name of the table
- object An &$object: object whose properties match table fields
- string $keyName: The name of the primary key. If provided the object property is updated.
- JDatabaseMySQLi::insertObject() : Inserts a row into a table based on an objects properties
- JDatabaseMySQL::insertObject() : Inserts a row into a table based on an objects properties
Checks if field name needs to be quoted
- string $fieldName: The field name
Fetch a result row as an associative array
- JDatabaseMySQLi::loadAssoc() : Fetch a result row as an associative array
- JDatabaseMySQL::loadAssoc() : Fetch a result row as an associative array
Load a associactive list of database rows
- string $key: The field name of a primary key
- JDatabaseMySQLi::loadAssocList() : Load a assoc list of database rows
- JDatabaseMySQL::loadAssocList() : Load a assoc list of database rows
This global function loads the first row of a query into an object
- object 0
- JDatabaseMySQLi::loadObject() : This global function loads the first row of a query into an object
- JDatabaseMySQL::loadObject() : This global function loads the first row of a query into an object
Load a list of database objects
- string $key: The field name of a primary key
- JDatabaseMySQLi::loadObjectList() : Load a list of database objects
- JDatabaseMySQL::loadObjectList() : Load a list of database objects
This method loads the first field of the first row returned by the query.
- JDatabaseMySQLi::loadResult() : This method loads the first field of the first row returned by the query.
- JDatabaseMySQL::loadResult() : This method loads the first field of the first row returned by the query.
Load an array of single field results into an array
- $numinarray
- JDatabaseMySQLi::loadResultArray() : Load an array of single field results into an array
- JDatabaseMySQL::loadResultArray() : Load an array of single field results into an array
Load the first row returned by the query
- JDatabaseMySQLi::loadRow() : Description
- JDatabaseMySQL::loadRow() : Description
Load a list of database rows (numeric column indexing)
If key is not empty then the returned array is indexed by the value the database key. Returns null if the query fails.
- string $key: The field name of a primary key
- JDatabaseMySQLi::loadRowList() : Load a list of database rows (numeric column indexing)
- JDatabaseMySQL::loadRowList() : Load a list of database rows (numeric column indexing)
Quote an identifier name (field, table, etc)
- string $s: The name
ADODB compatability function
- $sql
- $nrows
- $page
- $inputarr
- $secs2cache
Execute the query
- JDatabaseMySQLi::query() : Execute the query
- JDatabaseMySQL::query() : Execute the query
Execute a batch query
- $abort_on_error
- $p_transaction_safe
- JDatabaseMySQLi::queryBatch() : Execute a batch query
- JDatabaseMySQL::queryBatch() : Execute a batch query
Get a quoted database escaped string
- string $text: A string
- boolean $escaped: Default true to escape string, false to leave the string unchanged
This function replaces a string identifier $prefix with the string held is the _table_prefix class variable.
- string $sql: The SQL query
- string $prefix: The common table prefix
ADODB compatability function
- $query
- $count
- $offset
Sets the SQL query string for later execution.
This function replaces a string identifier $prefix with the string held is the _table_prefix class variable.
- string $sql: The SQL query
- string $offset: The offset to start selection
- string $limit: The number of results to return
- string $prefix: The common table prefix
Custom settings for UTF support
- JDatabaseMySQLi::setUTF() : Custom settings for UTF support
- JDatabaseMySQL::setUTF() : Custom settings for UTF support
Splits a string of queries into an array of individual queries
- string $queries: The queries to split
Print out an error statement
- boolean $showSQL: If TRUE, displays the last SQL statement sent to the database
Test to see if the MySQLi connector is available
- JDatabaseMySQLi::test() : Test to see if the MySQLi connector is available
- JDatabaseMySQL::test() : Test to see if the MySQL connector is available
Update an object in the database
- string $table
- object &$object
- string $keyName
- boolean $updateNulls
- JDatabaseMySQLi::updateObject() : Description
- JDatabaseMySQL::updateObject() : Description
Inherited Methods
Inherited From JObject
JObject::JObject()
JObject::__construct()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::getPublicProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()





JDatabase (Subpackage Database)
static