Joomla! Platform 12.1

Abstract Class JDatabaseDriver

Description

Implements interfaces:

Joomla Platform Database Driver Class

  • method: string q(): q($text, $escape) Alias for quote method
  • method: string qn(): qs($name, $as) Alias for quoteName method
  • abstract:
  • since: 12.1

Located in /libraries/joomla/database/driver.php (line 43)

Abstract class JDatabase

Abstract class JDatabaseDriver   (Subpackage Database)
Direct descendents
Class Description
ClassJDatabaseDriverSqlsrv SQL Server database driver
Abstract classJDatabaseDriverPdo Joomla Platform PDO Database Driver Class
ClassJDatabaseDriverMysql MySQL database driver
ClassJDatabaseDriverPostgresql PostgreSQL database driver
Variable Summary
Static variable static string $dbMinimum
Static variable static array $instances
Variable resource $connection
Variable integer $count
Variable resource $cursor
Variable boolean $debug
Variable string $errorMsg
Variable integer $errorNum
Variable integer $limit
Variable array $log
Variable string $name
Variable string $nameQuote
Variable string $nullDate
Variable integer $offset
Variable array $options
Variable mixed $sql
Variable string $tablePrefix
Variable boolean $utf
Method Summary
Static method static array getConnectors ()
Static method static JDatabaseDriver getInstance ([array $options = array()])
Static method static array splitSql (string $sql)
Constructor JDatabaseDriver __construct (array $options)
Abstract method void connect ()
Abstract method boolean connected ()
Abstract method void disconnect ()
Abstract method JDatabaseDriver dropTable (string $table, [boolean $ifExists = true])
Abstract method string escape (string $text, [boolean $extra = false])
Abstract method mixed execute ()
Abstract method mixed fetchArray ([mixed $cursor = null])
Abstract method mixed fetchAssoc ([mixed $cursor = null])
Abstract method mixed fetchObject ([mixed $cursor = null], [string $class = 'stdClass'])
Abstract method void freeResult ([mixed $cursor = null])
Abstract method integer getAffectedRows ()
Abstract method mixed getCollation ()
Method resource getConnection ()
Method integer getCount ()
Method string getDatabase ()
Method string getDateFormat ()
Method JDatabaseIterator getIterator ([string $column = null], [string $class = 'stdClass'])
Method array getLog ()
Method string getMinimum ()
Method string getNullDate ()
Abstract method integer getNumRows ([resource $cursor = null])
Method string getPrefix ()
Method JDatabaseQuery getQuery ([boolean $new = false])
Abstract method array getTableColumns (string $table, [boolean $typeOnly = true])
Abstract method array getTableCreate (mixed $tables)
Abstract method array getTableKeys (mixed $tables)
Abstract method array getTableList ()
Method boolean getUTFSupport ()
Abstract method string getVersion ()
Method boolean hasUTFSupport ()
Abstract method integer insertid ()
Method boolean insertObject (string $table, object &$object, [string $key = null])
Method boolean isMinimumVersion ()
Method mixed loadAssoc ()
Method mixed loadAssocList ([string $key = null], [string $column = null])
Method mixed loadColumn ([integer $offset = 0])
Method mixed loadNextObject ([string $class = 'stdClass'])
Method mixed loadNextRow ()
Method mixed loadObject ([string $class = 'stdClass'])
Method mixed loadObjectList ([string $key = ''], [string $class = 'stdClass'])
Method mixed loadResult ()
Method mixed loadRow ()
Method mixed loadRowList ([string $key = null])
Abstract method JDatabaseDriver lockTable (string $tableName)
Method string quote (string $text, [boolean $escape = true])
Method mixed quoteName (mixed $name, [mixed $as = null])
Method string quoteNameStr (array $strArr)
Abstract method JDatabaseDriver renameTable (string $oldTable, string $newTable, [string $backup = null], [string $prefix = null])
Method string replacePrefix (string $sql, [string $prefix = '#__'])
Abstract method boolean select (string $database)
Method boolean setDebug (boolean $level)
Method JDatabaseDriver setQuery (mixed $query, [integer $offset = 0], [integer $limit = 0])
Abstract method boolean setUTF ()
Method void truncateTable (string $table)
Method boolean updateObject (string $table, object &$object, string $key, [boolean $nulls = false])
Method string __call (string $method, array $args)
Variables
resource $connection (line 65)
  • var: The database connection resource.
  • since: 11.1
  • access: protected
integer $count = 0 (line 71)
  • var: The number of SQL statements executed by the database driver.
  • since: 11.1
  • access: protected
resource $cursor (line 77)
  • var: The database connection cursor from the last query.
  • since: 11.1
  • access: protected
string $dbMinimum (line 167)
  • var: The minimum supported database version.
  • since: 12.1
  • access: protected

Redefined in descendants as:
boolean $debug = false (line 83)
  • var: The database driver debugging state.
  • since: 11.1
  • access: protected
string $errorMsg (line 155)
  • var: The database error message
  • deprecated: 12.1
  • since: 11.1
  • access: protected
integer $errorNum = 0 (line 148)
  • var: The database error number
  • deprecated: 12.1
  • since: 11.1
  • access: protected
array $instances = array() (line 161)
  • var: JDatabaseDriver instances container.
  • since: 11.1
  • access: protected
integer $limit = 0 (line 89)
  • var: The affected row limit for the current SQL statement.
  • since: 11.1
  • access: protected
array $log = array() (line 95)
  • var: The log of executed SQL statements by the database driver.
  • since: 11.1
  • access: protected
string $name (line 59)

The name of the database driver.

  • since: 11.1
  • access: public

Redefined in descendants as:
string $nameQuote (line 104)
  • var: 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.
  • since: 11.1
  • access: protected

Redefined in descendants as:
  • JDatabaseDriverSqlsrv::$nameQuote : 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.
  • JDatabaseDriverPdo::$nameQuote : 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.
  • JDatabaseDriverSqlite::$nameQuote : 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.
  • JDatabaseDriverMysql::$nameQuote : 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.
  • JDatabaseDriverPostgresql::$nameQuote : Quote for named objects
string $nullDate (line 111)
  • var: 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.
  • since: 11.1
  • access: protected

Redefined in descendants as:
  • JDatabaseDriverSqlsrv::$nullDate : 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.
  • JDatabaseDriverPdo::$nullDate : 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.
  • JDatabaseDriverMysql::$nullDate : 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.
  • JDatabaseDriverPostgresql::$nullDate : The null/zero date string
integer $offset = 0 (line 117)
  • var: The affected row offset to apply for the current SQL statement.
  • since: 11.1
  • access: protected
array $options (line 123)
  • var: Passed in upon instantiation and saved.
  • since: 11.1
  • access: protected
mixed $sql (line 129)
  • var: The current SQL statement to execute.
  • since: 11.1
  • access: protected
string $tablePrefix (line 135)
  • var: The common database table prefix.
  • since: 11.1
  • access: protected
boolean $utf = true (line 141)
  • var: True if the database engine supports UTF-8 character encoding.
  • since: 11.1
  • access: protected
Methods
Constructor __construct (line 366)

Constructor.

  • since: 11.1
  • access: public
JDatabaseDriver __construct (array $options)
  • array $options: List of options used to configure the connection

Redefined in descendants as:
connect (line 388)

Connects to the database if needed.

  • return: Returns void if the database connected successfully.
  • abstract:
  • throws: RuntimeException
  • since: 12.1
  • access: public
void connect ()

Redefined in descendants as:
connected (line 397)

Determines if the connection to the server is active.

  • return: True if connected to the database engine.
  • abstract:
  • since: 11.1
  • access: public
boolean connected ()

Redefined in descendants as:
disconnect (line 406)

Disconnects the database.

  • abstract:
  • since: 12.1
  • access: public
void disconnect ()

Redefined in descendants as:
dropTable (line 419)

Drops a table from the database.

  • return: Returns this object to support chaining.
  • abstract:
  • throws: RuntimeException
  • since: 11.4
  • access: public
JDatabaseDriver dropTable (string $table, [boolean $ifExists = true])
  • string $table: The name of the database table to drop.
  • boolean $ifExists: Optionally specify that the table must exist before it is dropped.

Redefined in descendants as:
escape (line 431)

Method to escape a string for usage in an SQL statement.

  • return: The escaped string.
  • abstract:
  • since: 11.1
  • access: public
string escape (string $text, [boolean $extra = false])
  • string $text: The string to be escaped.
  • boolean $extra: Optional parameter to provide extra escaping.

Redefined in descendants as:
execute (line 1678)

Execute the SQL statement.

  • return: A database cursor resource on success, boolean false on failure.
  • abstract:
  • throws: RuntimeException
  • since: 12.1
  • access: public
mixed execute ()

Redefined in descendants as:
fetchArray (line 442)

Method to fetch a row from the result set cursor as an array.

  • return: Either the next row from the result set or false if there are no more rows.
  • abstract:
  • since: 11.1
  • access: protected
mixed fetchArray ([mixed $cursor = null])
  • mixed $cursor: The optional result set cursor from which to fetch the row.

Redefined in descendants as:
fetchAssoc (line 453)

Method to fetch a row from the result set cursor as an associative array.

  • return: Either the next row from the result set or false if there are no more rows.
  • abstract:
  • since: 11.1
  • access: protected
mixed fetchAssoc ([mixed $cursor = null])
  • mixed $cursor: The optional result set cursor from which to fetch the row.

Redefined in descendants as:
fetchObject (line 465)

Method to fetch a row from the result set cursor as an object.

  • return: Either the next row from the result set or false if there are no more rows.
  • abstract:
  • since: 11.1
  • access: protected
mixed fetchObject ([mixed $cursor = null], [string $class = 'stdClass'])
  • 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.

Redefined in descendants as:
freeResult (line 476)

Method to free up the memory used for the result set.

  • abstract:
  • since: 11.1
  • access: protected
void freeResult ([mixed $cursor = null])
  • mixed $cursor: The optional result set cursor from which to fetch the row.

Redefined in descendants as:
getAffectedRows (line 485)

Get the number of affected rows for the previous executed SQL statement.

  • return: The number of affected rows.
  • abstract:
  • since: 11.1
  • access: public
integer getAffectedRows ()

Redefined in descendants as:
getCollation (line 494)

Method to get the database collation in use by sampling a text field of a table in the database.

  • return: The collation in use by the database or boolean false if not supported.
  • abstract:
  • since: 11.1
  • access: public
mixed getCollation ()

Redefined in descendants as:
getConnection (line 504)

Method that provides access to the underlying database connection. Useful for when you need to call a proprietary method such as postgresql's lo_* methods.

  • return: The underlying database connection resource.
  • since: 11.1
  • access: public
resource getConnection ()
getConnectors (line 178)

Get a list of available database connectors. The list will only be populated with connectors that both the class exists and the static test method returns true. This gives us the ability to have a multitude of connector classes that are self-aware as to whether or not they are able to be used on a given system.

  • return: An array of available database connectors.
  • since: 11.1
  • access: public
array getConnectors ()

Redefinition of:
JDatabase::getConnectors()
Get a list of available database connectors. The list will only be populated with connectors that both the class exists and the static test method returns true. This gives us the ability to have a multitude of connector classes that are self-aware as to whether or not they are able to be used on a given system.
getCount (line 516)

Get the total number of SQL statements executed by the database driver.

  • since: 11.1
  • access: public
integer getCount ()
getDatabase (line 528)

Gets the name of the database used by this conneciton.

  • since: 11.4
  • access: protected
string getDatabase ()
getDateFormat (line 540)

Returns a PHP date() function compliant date format for the database driver.

  • return: The format string.
  • since: 11.1
  • access: public
string getDateFormat ()

Redefined in descendants as:
getExporter (line 612)

Gets an exporter class object.

  • return: An exporter object.
  • since: 12.1
  • throws: RuntimeException
  • access: public
JDatabaseExporter getExporter ()
getImporter (line 638)

Gets an importer class object.

  • return: An importer object.
  • since: 12.1
  • throws: RuntimeException
  • access: public
JDatabaseImporter getImporter ()
getInstance (line 234)

Method to return a JDatabaseDriver instance based on the given options. There are three global options and then

the rest are specific to the database driver. The 'driver' option defines which JDatabaseDriver class is used for the connection -- the default is 'mysql'. The 'database' option determines which database is to be used for the connection. The 'select' option determines whether the connector should automatically select the chosen database.

Instances are unique to the given options and new objects are only created when a unique options array is passed into the method. This ensures that we don't end up with unnecessary database connection resources.

  • return: A database object.
  • since: 11.1
  • access: public
JDatabaseDriver getInstance ([array $options = array()])
  • array $options: Parameters to be passed to the database driver.

Redefinition of:
JDatabase::getInstance()
Method to return a JDatabaseDriver instance based on the given options. There are three global options and then
getIterator (line 699)

Get a new iterator on the current query.

  • return: A new database iterator.
  • since: 12.1
  • throws: RuntimeException
  • access: public
JDatabaseIterator getIterator ([string $column = null], [string $class = 'stdClass'])
  • string $column: An option column to use as the iterator key.
  • string $class: The class of object that is returned.
getLog (line 552)

Get the database driver SQL statement log.

  • return: SQL statements executed by the database driver.
  • since: 11.1
  • access: public
array getLog ()
getMinimum (line 564)

Get the minimum supported database version.

  • return: The minimum version number for the database driver.
  • since: 12.1
  • access: public
string getMinimum ()
getNullDate (line 576)

Get the null or zero representation of a timestamp for the database driver.

  • return: Null or zero representation of a timestamp.
  • since: 11.1
  • access: public
string getNullDate ()
getNumRows (line 590)

Get the number of returned rows for the previous executed SQL statement.

  • return: The number of returned rows.
  • abstract:
  • since: 11.1
  • access: public
integer getNumRows ([resource $cursor = null])
  • resource $cursor: An optional database cursor resource to extract the row count from.

Redefined in descendants as:
getPrefix (line 599)

Get the common table prefix for the database driver.

  • return: The common database table prefix.
  • since: 11.1
  • access: public
string getPrefix ()
getQuery (line 666)

Get the current query object or a new JDatabaseQuery object.

  • return: The current query object or a new object extending the JDatabaseQuery class.
  • since: 11.1
  • throws: RuntimeException
  • access: public
JDatabaseQuery getQuery ([boolean $new = false])
  • boolean $new: False to return the current query object, True to return a new JDatabaseQuery object.

Redefined in descendants as:
getTableColumns (line 726)

Retrieves field information about the given tables.

  • return: An array of fields by table.
  • abstract:
  • throws: RuntimeException
  • since: 11.1
  • access: public
array getTableColumns (string $table, [boolean $typeOnly = true])
  • string $table: The name of the database table.
  • boolean $typeOnly: True (default) to only return field types.

Redefined in descendants as:
getTableCreate (line 738)

Shows the table CREATE statement that creates the given tables.

  • return: A list of the create SQL for the tables.
  • abstract:
  • throws: RuntimeException
  • since: 11.1
  • access: public
array getTableCreate (mixed $tables)
  • mixed $tables: A table name or a list of table names.

Redefined in descendants as:
getTableKeys (line 750)

Retrieves field information about the given tables.

  • return: An array of keys for the table(s).
  • abstract:
  • throws: RuntimeException
  • since: 11.1
  • access: public
array getTableKeys (mixed $tables)
  • mixed $tables: A table name or a list of table names.

Redefined in descendants as:
getTableList (line 760)

Method to get an array of all tables in the database.

  • return: An array of all the tables in the database.
  • abstract:
  • throws: RuntimeException
  • since: 11.1
  • access: public
array getTableList ()

Redefined in descendants as:
getUTFSupport (line 770)

Determine whether or not the database engine supports UTF-8 character encoding.

  • return: True if the database engine supports UTF-8 character encoding.
  • deprecated: 12.3 Use hasUTFSupport() instead
  • since: 11.1
  • access: public
boolean getUTFSupport ()
getVersion (line 795)

Get the version of the database connector

  • return: The database connector version.
  • abstract:
  • since: 11.1
  • access: public
string getVersion ()

Redefined in descendants as:
hasUTFSupport (line 783)

Determine whether or not the database engine supports UTF-8 character encoding.

  • return: True if the database engine supports UTF-8 character encoding.
  • since: 12.1
  • access: public
boolean hasUTFSupport ()
insertid (line 804)

Method to get the auto-incremented value from the last INSERT statement.

  • return: The value of the auto-increment field from the last inserted row.
  • abstract:
  • since: 11.1
  • access: public
integer insertid ()

Redefined in descendants as:
insertObject (line 818)

Inserts a row into a table based on an object's properties.

  • return: True on success.
  • since: 11.1
  • throws: RuntimeException
  • access: public
boolean insertObject (string $table, object &$object, [string $key = null])
  • string $table: The name of the database table to insert into.
  • object &$object: A reference to an object whose public properties match the table fields.
  • string $key: The name of the primary key. If provided the object property is updated.

Redefined in descendants as:
isMinimumVersion (line 874)

Method to check whether the installed database version is supported by the database driver

  • return: True if the database version is supported
  • since: 12.1
  • access: public
boolean isMinimumVersion ()
loadAssoc (line 888)

Method to get the first row of the result set from the database query as an associative array of ['field_name' => 'row_value'].

  • return: The return value or null if the query failed.
  • since: 11.1
  • throws: RuntimeException
  • access: public
mixed loadAssoc ()
loadAssocList (line 930)

Method to get an array of the result set rows from the database query where each row is an associative array of ['field_name' => 'row_value']. The array of rows can optionally be keyed by a field name, but defaults to a sequential numeric array.

NOTE: Chosing to key the result array by a non-unique field name can result in unwanted behavior and should be avoided.

  • return: The return value or null if the query failed.
  • since: 11.1
  • throws: RuntimeException
  • access: public
mixed loadAssocList ([string $key = null], [string $column = null])
  • string $key: The name of a field on which to key the result array.
  • string $column: An optional column name. Instead of the whole row, only this column value will be in the result array.
loadColumn (line 974)

Method to get an array of values from the $offset field in each row of the result set from the database query.

  • return: The return value or null if the query failed.
  • since: 11.1
  • throws: RuntimeException
  • access: public
mixed loadColumn (integer $offset)
  • integer $offset: The row offset to use to build the result array.
loadNextObject (line 1009)

Method to get the next row in the result set from the database query as an object.

  • return: The result of the query as an array, false if there are no more rows.
  • since: 11.1
  • throws: RuntimeException
  • access: public
mixed loadNextObject ([string $class = 'stdClass'])
  • string $class: The class name to use for the returned row object.

Redefined in descendants as:
loadNextRow (line 1046)

Method to get the next row in the result set from the database query as an array.

  • return: The result of the query as an array, false if there are no more rows.
  • since: 11.1
  • throws: RuntimeException
  • access: public
mixed loadNextRow ()

Redefined in descendants as:
loadObject (line 1085)

Method to get the first row of the result set from the database query as an object.

  • return: The return value or null if the query failed.
  • since: 11.1
  • throws: RuntimeException
  • access: public
mixed loadObject ([string $class = 'stdClass'])
  • string $class: The class name to use for the returned row object.
loadObjectList (line 1125)

Method to get an array of the result set rows from the database query where each row is an object. The array of objects can optionally be keyed by a field name, but defaults to a sequential numeric array.

NOTE: Choosing to key the result array by a non-unique field name can result in unwanted behavior and should be avoided.

  • return: The return value or null if the query failed.
  • since: 11.1
  • throws: RuntimeException
  • access: public
mixed loadObjectList ([string $key = ''], [string $class = 'stdClass'])
  • string $key: The name of a field on which to key the result array.
  • string $class: The class name to use for the returned row objects.
loadResult (line 1165)

Method to get the first field of the first row of the result set from the database query.

  • return: The return value or null if the query failed.
  • since: 11.1
  • throws: RuntimeException
  • access: public
mixed loadResult ()

Redefined in descendants as:
loadRow (line 1199)

Method to get the first row of the result set from the database query as an array. Columns are indexed numerically so the first column in the result set would be accessible via $row[0], etc.

  • return: The return value or null if the query failed.
  • since: 11.1
  • throws: RuntimeException
  • access: public
mixed loadRow ()
loadRowList (line 1238)

Method to get an array of the result set rows from the database query where each row is an array. The array of objects can optionally be keyed by a field offset, but defaults to a sequential numeric array.

NOTE: Choosing to key the result array by a non-unique field can result in unwanted behavior and should be avoided.

  • return: The return value or null if the query failed.
  • since: 11.1
  • throws: RuntimeException
  • access: public
mixed loadRowList ([string $key = null])
  • string $key: The name of a field on which to key the result array.
lockTable (line 1280)

Locks a table in the database.

  • return: Returns this object to support chaining.
  • abstract:
  • throws: RuntimeException
  • since: 11.4
  • access: public
JDatabaseDriver lockTable (string $tableName)
  • string $tableName: The name of the table to unlock.

Redefined in descendants as:
quote (line 1292)

Method to quote and optionally escape a string to database requirements for insertion into the database.

  • return: The quoted input string.
  • since: 11.1
  • access: public
string quote (string $text, [boolean $escape = true])
  • string $text: The string to quote.
  • boolean $escape: True (default) to escape the string, false to leave it unchanged.
quoteName (line 1310)

Wrap an SQL statement identifier name such as column, table or database names in quotes to prevent injection risks and reserved word conflicts.

  • return: The quote wrapped name, same type of $name.
  • since: 11.1
  • access: public
mixed quoteName (mixed $name, [mixed $as = null])
  • mixed $name: The identifier name to wrap in quotes, or an array of identifier names to wrap in quotes. Each type supports dot-notation name.
  • mixed $as: The AS query part associated to $name. It can be string or array, in latter case it has to be same length of $name; if is null there will not be any AS part for string or array element.
quoteNameStr (line 1358)

Quote strings coming from quoteName call.

  • return: Dot-imploded string of quoted parts.
  • since: 11.3
  • access: protected
string quoteNameStr (array $strArr)
  • array $strArr: Array of strings coming from quoteName dot-explosion.
renameTable (line 1491)

Renames a table in the database.

  • return: Returns this object to support chaining.
  • abstract:
  • throws: RuntimeException
  • since: 11.4
  • access: public
JDatabaseDriver renameTable (string $oldTable, string $newTable, [string $backup = null], [string $prefix = null])
  • string $oldTable: The name of the table to be renamed
  • string $newTable: The new name for the table.
  • string $backup: Table prefix
  • string $prefix: For the table - used to rename constraints in non-mysql databases

Redefined in descendants as:
replacePrefix (line 1394)

This function replaces a string identifier $prefix with the string held is the tablePrefix class variable.

  • return: The processed SQL statement.
  • since: 11.1
  • access: public
string replacePrefix (string $sql, [string $prefix = '#__'])
  • string $sql: The SQL statement to prepare.
  • string $prefix: The common table prefix.

Redefined in descendants as:
select (line 1503)

Select a database for use.

  • return: True if the database was successfully selected.
  • abstract:
  • throws: RuntimeException
  • since: 11.1
  • access: public
boolean select (string $database)
  • string $database: The name of the database to select for use.

Redefined in descendants as:
setDebug (line 1514)

Sets the database debugging state for the driver.

  • return: The old debugging level.
  • since: 11.1
  • access: public
boolean setDebug (boolean $level)
  • boolean $level: True to enable debugging.
setQuery (line 1533)

Sets the SQL statement string for later execution.

  • return: This object to support method chaining.
  • since: 11.1
  • access: public
JDatabaseDriver setQuery (mixed $query, integer $offset, integer $limit)
  • mixed $query: The SQL statement to set either as a JDatabaseQuery object or a string.
  • integer $offset: The affected row offset to set.
  • integer $limit: The maximum affected rows to set.

Redefined in descendants as:
setUTF (line 1549)

Set the connection to use UTF-8 character encoding.

  • return: True on success.
  • abstract:
  • since: 11.1
  • access: public
boolean setUTF ()

Redefined in descendants as:
splitSql (line 283)

Splits a string of multiple queries into an array of individual queries.

  • return: The queries from the input string separated into an array.
  • since: 11.1
  • access: public
array splitSql (string $sql)
  • string $sql: Input SQL string with which to split into individual queries.

Redefinition of:
JDatabase::splitSql()
Splits a string of multiple queries into an array of individual queries.
transactionCommit (line 1559)

Method to commit a transaction.

  • abstract:
  • throws: RuntimeException
  • since: 11.1
  • access: public
void transactionCommit ()

Redefined in descendants as:
transactionRollback (line 1569)

Method to roll back a transaction.

  • abstract:
  • throws: RuntimeException
  • since: 11.1
  • access: public
void transactionRollback ()

Redefined in descendants as:
transactionStart (line 1579)

Method to initialize a transaction.

  • abstract:
  • throws: RuntimeException
  • since: 11.1
  • access: public
void transactionStart ()

Redefined in descendants as:
truncateTable (line 1591)

Method to truncate a table.

  • since: 11.3
  • throws: RuntimeException
  • access: public
void truncateTable (string $table)
  • string $table: The table to truncate
unlockTables (line 1688)

Unlocks tables in the database.

  • return: Returns this object to support chaining.
  • abstract:
  • throws: RuntimeException
  • since: 11.4
  • access: public
JDatabaseDriver unlockTables ()

Redefined in descendants as:
updateObject (line 1610)

Updates a row in a table based on an object's properties.

  • return: True on success.
  • since: 11.1
  • throws: RuntimeException
  • access: public
boolean updateObject (string $table, object &$object, string $key, [boolean $nulls = false])
  • string $table: The name of the database table to update.
  • object &$object: A reference to an object whose public properties match the table fields.
  • string $key: The name of the primary key.
  • boolean $nulls: True to update null fields or false to ignore them.

Redefined in descendants as:
__call (line 341)

Magic method to provide method alias support for quote() and quoteName().

  • return: The aliased method's return value or null.
  • since: 11.1
  • access: public
string __call (string $method, array $args)
  • string $method: The called method.
  • array $args: The array of arguments passed to the method.

Inherited Methods

Inherited From JDatabase

 JDatabase::getConnectors()
 JDatabase::getErrorMsg()
 JDatabase::getErrorNum()
 JDatabase::getInstance()
 JDatabase::query()
 JDatabase::splitSql()
 JDatabase::stderr()
 JDatabase::test()
/html>