JDatabase/11.1

From Joomla! Documentation

Jump to: navigation, search

Joomla 11.1 JDatabase

Description

JDatabase is an abstract class which is extended by specific database drivers. It provides database connections for Joomla. [Edit Descripton]

Methods

Visibility Method name Description
public __call Magic method to provide method alias support for and .
public addQuoted Adds a field or array of field names to the list that are to be quoted.
public connected Determines if the connection to the server is active.
public dateToString Method to get a object represented as a datetime string in a format recognized by the database server.
public debug Sets the debug level on or off.
public explain Diagnostic method to return explain information for a query.
public getAffectedRows Get the number of affected rows for the previous executed SQL statement.
public getCollation Method to get the database collation in use by sampling a text field of a table in the database.
public getConnection Method that provides access to the underlying database connection.
public getCount Get the total number of SQL statements executed by the database driver.
public getErrorMsg Gets the error message from the database connection.
public getErrorNum Gets the error number from the database connection.
public getEscaped Method to escape a string for usage in an SQL statement.
public getLog Get the database driver SQL statement log.
public getNullDate Get the null or zero representation of a timestamp for the database driver.
public getNumRows Get the number of returned rows for the previous executed SQL statement.
public getPrefix Get the common table prefix for the database driver.
public getQuery Get the current or query, or new object.
public getTableCreate Shows the table CREATE statement that creates the given tables.
public getTableFields Retrieves field information about the given tables.
public getTableList Method to get an array of all tables in the database.
public getTicker Get the total number of SQL statements executed by the database driver.
public getUTFSupport Determine whether or not the database engine supports UTF-8 character encoding.
public getVersion Get the version of the database connector.
public hasUTF Determines if the database engine supports UTF-8 character encoding.
public insertid Method to get the auto-incremented value from the last INSERT statement.
public insertObject Inserts a row into a table based on an object's properties.
public isQuoted Checks if field name needs to be quoted.
public loadAssoc Method to get the first row of the result set from the database query as an associative array of ['field_name' => 'row_value'].
public loadAssocList 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'].
public loadNextObject Method to get the next row in the result set from the database query as an object.
public loadNextRow Method to get the next row in the result set from the database query as an array.
public loadObject Method to get the first row of the result set from the database query as an object.
public loadObjectList Method to get an array of the result set rows from the database query where each row is an object.
public loadResult Method to get the first field of the first row of the result set from the database query.
public loadResultArray Method to get an array of values from the field in each row of the result set from the database query.
public loadRow Method to get the first row of the result set from the database query as an array.
public loadRowList Method to get an array of the result set rows from the database query where each row is an array.
public nameQuote Wrap an SQL statement identifier name such as field, table or database names in quotes to prevent injection risks and reserved word conflicts.
public query Execute the SQL statement.
public queryBatch Execute a query batch.
public quote Method to quote and optionally escape a string to database requirements for insertion into the database.
public select Select a database for use.
public setDebug Sets the database debugging state for the driver.
public setQuery Sets the SQL statement string for later execution.
public setUTF Set the connection to use UTF-8 character encoding.
public stderr Return the most recent error message for the database connector.
public transactionCommit Method to commit a transaction.
public transactionRollback Method to roll back a transaction.
public transactionStart Method to initialize a transaction.
public updateObject Updates a row in a table based on an object's properties.
public static getConnectors Get a list of available database connectors.
public static getInstance Method to return a instance based on the given options.
public static splitSql Splits a string of multiple queries into an array of individual queries.
public static test Test to see if the connector is available.
protected __construct Constructor.
protected fetchArray Method to fetch a row from the result set cursor as an array.
protected fetchAssoc Method to fetch a row from the result set cursor as an associative array.
protected fetchObject Method to fetch a row from the result set cursor as an object.
protected freeResult Method to free up the memory used for the result set.
protected replacePrefix This function replaces a string identifier with the string held is the class variable.

Importing

jimport( 'joomla.database.database' );

See also

[Edit See Also]

User contributed notes


Personal tools