API Joomla 1.5.26
Documentation des API du CMS Joomla en version 1.5
|
JDatabase::__construct | ( | $ | options | ) |
Database object constructor
public
array | List of options used to configure the connection |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::__destruct | ( | ) |
Database object destructor
private
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::addQuoted | ( | $ | quoted | ) |
Adds a field or array of field names to the list that are to be quoted
public
mixed | Field name or array of names |
JDatabase::BeginTrans | ( | ) |
ADODB compatability function
JDatabase::CommitTrans | ( | ) |
ADODB compatability function
JDatabase::connected | ( | ) |
Determines if the connection to the server is active.
public
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::debug | ( | $ | level | ) |
Sets the debug level on or off
public
int | 0 = off, 1 = on |
JDatabase::ErrorMsg | ( | ) |
ADODB compatability function
JDatabase::ErrorNo | ( | ) |
ADODB compatability function
JDatabase::Execute | ( | $ | query | ) |
JDatabase::explain | ( | ) |
JDatabase::GenID | ( | $ | foo1 = null , |
$ | foo2 = null |
||
) |
ADODB compatability function
JDatabase::getAffectedRows | ( | ) |
Get the affected rows by the most recent query
public
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::GetCol | ( | $ | query | ) |
JDatabase::getCollation | ( | ) |
Get the database collation
public
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::getConnectors | ( | ) |
Get the database connectors
public
Références $class, $name, JFolder::files(), et jimport().
JDatabase::getErrorMsg | ( | $ | escaped = false | ) |
Get the error message
public
JDatabase::getErrorNum | ( | ) |
Get the error number
public
JDatabase::getEscaped | ( | $ | text, |
$ | extra = false |
||
) |
Get a database escaped string
string | The string to be escaped |
boolean | Optional parameter to provide extra escaping |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
& JDatabase::getInstance | ( | $ | options = array() | ) |
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 | Parameters to be passed to the database driver |
Références $error, $path, JError::raiseError(), et JError::setErrorHandling().
Référencé par JFactory::_createDBO(), et JInstallationHelper::getDBO().
JDatabase::getLog | ( | ) |
Get a database error log
public
JDatabase::getNullDate | ( | ) |
Get the database null date
public
JDatabase::getNumRows | ( | $ | cur = null | ) |
Get the number of rows returned by the most recent query
public
object | Database resource |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::GetOne | ( | $ | query | ) |
ADODB compatability function
public
string | SQL |
Références $query.
JDatabase::getPrefix | ( | ) |
Get the database table prefix
public
JDatabase::getQuery | ( | ) |
Get the active query
public
JDatabase::GetRow | ( | $ | query | ) |
ADODB compatability function
public
string | SQL |
Références $query.
JDatabase::getTableCreate | ( | $ | tables | ) |
Shows the CREATE TABLE statement that creates the given tables
public
array|string | A table name or a list of table names |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::getTableFields | ( | $ | tables, |
$ | typeonly = true |
||
) |
Retrieves information about the given tables
public
array|string | A table name or a list of table names |
boolean | Only return field types, default true |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::getTableList | ( | ) |
List tables in a database
public
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::getTicker | ( | ) |
Get the total number of queries made
public
JDatabase::getUTFSupport | ( | ) |
Get the database UTF-8 support
public
JDatabase::getVersion | ( | ) |
Get the version of the database connector
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::hasUTF | ( | ) |
Determines UTF support
public
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::insertid | ( | ) |
Get the ID generated from the previous INSERT operation
public
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::insertObject | ( | $ | table, |
&$ | object, | ||
$ | keyName = NULL |
||
) |
Inserts a row into a table based on an objects properties
string | The name of the table |
object | An object whose properties match table fields |
string | The name of the primary key. If provided the object property is updated. |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::isQuoted | ( | $ | fieldName | ) |
Checks if field name needs to be quoted
public
string | The field name |
JDatabase::loadAssoc | ( | ) |
Fetch a result row as an associative array
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::loadAssocList | ( | $ | key = '' | ) |
Load a associactive list of database rows
public
string | The field name of a primary key |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::loadObject | ( | ) |
This global function loads the first row of a query into an object
public
object |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::loadObjectList | ( | $ | key = '' | ) |
Load a list of database objects
public
string | The field name of a primary key |
If key is not empty then the returned array is indexed by the value the database key. Returns null if the query fails.
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::loadResult | ( | ) |
This method loads the first field of the first row returned by the query.
public
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::loadResultArray | ( | $ | numinarray = 0 | ) |
Load an array of single field results into an array
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::loadRow | ( | ) |
Load the first row returned by the query
public
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::loadRowList | ( | $ | key = '' | ) |
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.
public
string | The field name of a primary key |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::nameQuote | ( | $ | s | ) |
Quote an identifier name (field, table, etc)
public
string | The name |
JDatabase::PageExecute | ( | $ | sql, |
$ | nrows, | ||
$ | page, | ||
$ | inputarr = false , |
||
$ | secs2cache = 0 |
||
) |
ADODB compatability function
public
Références jimport().
JDatabase::query | ( | ) |
Execute the query
public
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::queryBatch | ( | $ | abort_on_error = true , |
$ | p_transaction_safe = false |
||
) |
Execute a batch query
public
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::Quote | ( | $ | text, |
$ | escaped = true |
||
) |
Get a quoted database escaped string
string | A string |
boolean | Default true to escape string, false to leave the string unchanged |
Références $text.
JDatabase::replacePrefix | ( | $ | sql, |
$ | prefix = '#__' |
||
) |
JDatabase::RollbackTrans | ( | ) |
ADODB compatability function
JDatabase::SelectLimit | ( | $ | query, |
$ | count, | ||
$ | offset = 0 |
||
) |
JDatabase::setQuery | ( | $ | sql, |
$ | offset = 0 , |
||
$ | limit = 0 , |
||
$ | prefix = '#__' |
||
) |
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.
public
string | The SQL query |
string | The offset to start selection |
string | The number of results to return |
string | The common table prefix |
Références $limit.
JDatabase::setUTF | ( | ) |
Custom settings for UTF support
public
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::splitSql | ( | $ | queries | ) |
JDatabase::stderr | ( | $ | showSQL = false | ) |
Print out an error statement
boolean | If TRUE, displays the last SQL statement sent to the database |
JDatabase::test | ( | ) | [static] |
Test to see if the MySQLi connector is available
public
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::updateObject | ( | $ | table, |
&$ | object, | ||
$ | keyName, | ||
$ | updateNulls = true |
||
) |
Update an object in the database
public
string | |
object | |
string | |
boolean |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::$_cursor = null |
JDatabase::$_debug = 0 |
JDatabase::$_errorMsg = '' |
JDatabase::$_errorNum = 0 |
JDatabase::$_hasQuoted = null |
JDatabase::$_limit = 0 |
JDatabase::$_log = null |
JDatabase::$_nameQuote = null |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::$_nullDate = null |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.
JDatabase::$_offset = 0 |
JDatabase::$_quoted = null |
JDatabase::$_resource = '' |
JDatabase::$_sql = '' |
JDatabase::$_table_prefix = '' |
JDatabase::$_ticker = 0 |
JDatabase::$_utf = 0 |
JDatabase::$name = '' |
Réimplémentée dans JDatabaseMySQL, et JDatabaseMySQLi.