JDatabase
From Joomla! Documentation
Revision as of 19:31, 7 February 2009 by Chris Davenport (Talk | contribs)
JDatabase is an abstract class which is extended by specific database drivers. It provides database connections for Joomla!
Contents |
Defined in
/libraries/joomla/database/database.php
Extends
Extended by
Methods
Properties which do not have specific get or set methods listed here can be retrieved or set using the inherited JObject->get method.
| Method name | Description |
|---|---|
| addQuoted | Adds a field or array of field names to the list that are to be quoted. |
| BeginTrans | ADODB compatibility function. |
| CommitTrans | ADODB compatibility function. |
| connected | Determines if the connection to the server is active. |
| debug | Sets the debug level on or off. |
| ErrorMsg | ADODB compatibility function. |
| ErrorNo | ADODB compatibility function. |
| Execute | ADODB compatibility function. |
| explain | Diagnostic function. |
| GenID | ADODB compatibility function. |
| getAffectedRows | Get the number of rows affected by the most recent query. |
| GetCol | ADODB compatibility function. |
| getCollation | Get the database collation. |
| getConnectors | Get the database connectors. |
| getErrorMsg | Get the error message. |
| getErrorNum | Get the error number. |
| getEscaped | Get a database escaped string. |
| getInstance | Returns a reference to the global database object, only creating it if it doesn't already exist. |
| getLog | Get a database error log. |
| getNullDate | Get the database null date. |
| getNumRows | Get the number of rows returned by the most recent query. |
| GetOne | ADODB compatibility function. |
| getPrefix | Get the database table prefix. |
| getQuery | Get the active query. |
| GetRow | ADODB compatibility function. |
| getTableCreate | Shows the CREATE TABLE statement that creates the given tables. |
| getTableFields | Retrieves information about the given tables. |
| getTableList | Lists tables in a database. |
| getTicker | Get the total number of queries made. |
| getUTFSupport | Get the database UTF-8 support. |
| getVersion | Get the version of the database connector. |
| hasUTF | Determines UTF support. |
| insertid | Gets the ID generated from the previous INSERT operation. |
| insertObject | Inserts a row into a table based on an objects properties. |
| isQuoted | Checks if field name needs to be quoted. |
| loadAssoc | Fetch a result row as an associative array. |
| loadAssocList | Loads an associative list of database rows. |
| loadObject | Loads the first row of a query into an object. |
| loadObjectList | Loads a list of database objects. |
| JDatabase/loadResult | Loads the first field of the first row returned by the query. |
| loadResultArray | Loads an array of single field results into an array. |
| loadRow | Loads the first row returned by the query. |
| loadRowList | Loads a list of database rows (numeric column indexing). |
| nameQuote | Quote an identifier name (field, table, etc.). |
| PageExecute | ADODB compatibility function. |
| query | Execute the query. |
| queryBatch | Execute a batch query. |
| Quote | Get a quoted database escaped string. |
| replacePrefix | Replaces a string identifier $prefix with the string held is the _table_prefix class variable. |
| RollbackTrans | ADODB compatibility function. |
| SelectLimit | ADODB compatibility function. |
| setQuery | Sets the SQL query string for later execution. |
| setUTF | Custom settings for UTF support. |
| splitSql | Splits a string of queries into an array of individual queries. |
| stderr | Prints out an error statement. |
| test | Tests to see if the connector is available. |
| updateObject | Updates an object in the database. |
Importing
jimport( 'joomla.database.database' );