JDatabase
Database connector class
Located in /joomla/database/database.php (line 26)
JObject (Subpackage Base) JDatabase (Subpackage Database)
Class | Description |
---|---|
JDatabaseMySQL | MySQL database driver |
JDatabaseMySQLi | MySQLi database driver |
Database object constructor
- string $host: Database host
- string $user: Database user name
- string $pass: Database user password
- string $db: Database name
- string $table_prefix: Common prefix for all tables
- JObject::__construct()
- Class constructor, overridden in descendant classes.
- JDatabaseMySQL::__construct() : Database object constructor
- JDatabaseMySQLi::__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
Diagnostic function
- JDatabaseMySQL::explain() : Diagnostic function
- JDatabaseMySQLi::explain() : Diagnostic function
ADODB compatability function
- $foo1
- $foo2
Get the affected rows by the most recent query
Get the database collation
- JDatabaseMySQL::getCollation() : Assumes database collation in use by sampling one text field in one table
- JDatabaseMySQLi::getCollation() : Assumes database collation in use by sampling one text field in one table
Get a database escaped string
- $text
- JDatabaseMySQL::getEscaped() : Get a database escaped string
- JDatabaseMySQLi::getEscaped() : Get a database escaped string
Returns a reference to the global Database object, only creating it if it doesn't already exist.
- string $driver: Database driver
- string $host: Database host
- string $user: Database user name
- string $pass: Database user password
- string $db: Database name
- string $table_prefix: Common prefix for all tables
Get the number of rows returned by the most recent query
- object Database $cur: resource
- array $tables: A list of table names
List database table fields
- array $tables: A list of table names
List tables in a database
Get the version of the database connector
Determines UTF support
- JDatabaseMySQL::hasUTF() : Determines UTF support
- JDatabaseMySQLi::hasUTF() : Determines UTF support
Get the ID generated from the previous INSERT operation
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.
- JDatabaseMySQL::insertObject() : Inserts a row into a table based on an objects properties
- JDatabaseMySQLi::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
- JDatabaseMySQL::loadAssoc() : Fetch a result row as an associative array
- JDatabaseMySQLi::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
- JDatabaseMySQL::loadAssocList() : Load a assoc list of database rows
- JDatabaseMySQLi::loadAssocList() : Load a assoc list of database rows
This global function loads the first row of a query into an object
- object 0
- JDatabaseMySQL::loadObject() : This global function loads the first row of a query into an object
- JDatabaseMySQLi::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
- JDatabaseMySQL::loadObjectList() : Load a list of database objects
- JDatabaseMySQLi::loadObjectList() : Load a list of database objects
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.
- JDatabaseMySQLi::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
- JDatabaseMySQL::loadResultArray() : Load an array of single field results into an array
- JDatabaseMySQLi::loadResultArray() : Load an array of single field results into an array
Load the first row returned by the query
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
- JDatabaseMySQL::loadRowList() : Load a list of database rows (numeric column indexing)
- JDatabaseMySQLi::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
- JDatabaseMySQL::query() : Execute the query
- JDatabaseMySQLi::query() : Execute the query
Execute a batch query
- $abort_on_error
- $p_transaction_safe
- JDatabaseMySQL::queryBatch() : Execute a batch query
- JDatabaseMySQLi::queryBatch() : Execute a batch query
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
- JDatabaseMySQL::setUTF() : Custom settings for UTF support
- JDatabaseMySQLi::setUTF() : Custom settings for UTF support
Print out an error statement
- boolean $showSQL: If TRUE, displays the last SQL statement sent to the database
Update ab object in the database
- string $table
- object &$object
- string $keyName
- boolean $updateNulls
- JDatabaseMySQL::updateObject() : Document::db_updateObject()
- JDatabaseMySQLi::updateObject() : Document::db_updateObject()
Inherited Methods
Inherited From JObject
JObject::JObject()
JObject::__construct()
JObject::get()
JObject::getPublicProperties()
JObject::set()
JObject::toString()
Documentation generated on Mon, 05 Mar 2007 20:56:05 +0000 by phpDocumentor 1.3.1