| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Source view] [Print] [Project Stats]
(no description)
| Copyright: | Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. |
| License: | GNU/GPL, see LICENSE.php |
| Version: | $Id: database.php 14401 2010-01-26 14:10:00Z louis $ |
| File Size: | 1090 lines (20 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
JDatabase:: (59 methods):
__construct()
getInstance()
__destruct()
getConnectors()
test()
connected()
hasUTF()
setUTF()
addQuoted()
splitSql()
isQuoted()
debug()
getUTFSupport()
getErrorNum()
getErrorMsg()
getEscaped()
getLog()
getTicker()
nameQuote()
getPrefix()
getNullDate()
setQuery()
replacePrefix()
getQuery()
query()
getAffectedRows()
queryBatch()
explain()
getNumRows()
loadResult()
loadResultArray()
loadAssoc()
loadAssocList()
loadObject()
loadObjectList()
loadRow()
loadRowList()
insertObject()
updateObject()
stderr()
insertid()
getCollation()
getVersion()
getTableList()
getTableCreate()
getTableFields()
Quote()
GetCol()
Execute()
SelectLimit()
PageExecute()
GetRow()
GetOne()
BeginTrans()
RollbackTrans()
CommitTrans()
ErrorMsg()
ErrorNo()
GenID()
| __construct( $options ) X-Ref |
| Database object constructor param: array List of options used to configure the connection |
| getInstance( $options = array() X-Ref |
| 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. param: array Parameters to be passed to the database driver return: JDatabase A database object |
| __destruct() X-Ref |
| Database object destructor return: boolean |
| getConnectors() X-Ref |
| Get the database connectors return: array An array of available session handlers |
| test() X-Ref |
| Test to see if the MySQLi connector is available return: boolean True on success, false otherwise. |
| connected() X-Ref |
| Determines if the connection to the server is active. return: boolean |
| hasUTF() X-Ref |
| Determines UTF support return: boolean |
| setUTF() X-Ref |
| Custom settings for UTF support |
| addQuoted( $quoted ) X-Ref |
| Adds a field or array of field names to the list that are to be quoted param: mixed Field name or array of names |
| splitSql( $queries ) X-Ref |
| Splits a string of queries into an array of individual queries param: string The queries to split return: array queries |
| isQuoted( $fieldName ) X-Ref |
| Checks if field name needs to be quoted param: string The field name return: bool |
| debug( $level ) X-Ref |
| Sets the debug level on or off param: int 0 = off, 1 = on |
| getUTFSupport() X-Ref |
| Get the database UTF-8 support return: boolean |
| getErrorNum() X-Ref |
| Get the error number return: int The error number for the most recent query |
| getErrorMsg($escaped = false) X-Ref |
| Get the error message return: string The error message for the most recent query |
| getEscaped( $text, $extra = false ) X-Ref |
| Get a database escaped string param: string The string to be escaped param: boolean Optional parameter to provide extra escaping return: string |
| getLog( ) X-Ref |
| Get a database error log return: array |
| getTicker( ) X-Ref |
| Get the total number of queries made return: array |
| nameQuote( $s ) X-Ref |
| Quote an identifier name (field, table, etc) param: string The name return: string The quoted name |
| getPrefix() X-Ref |
| Get the database table prefix return: string The database prefix |
| getNullDate() X-Ref |
| Get the database null date return: string Quoted null/zero date string |
| setQuery( $sql, $offset = 0, $limit = 0, $prefix=') X-Ref |
| Sets the SQL query string for later execution. This function replaces a string identifier <var>$prefix</var> with the string held is the <var>_table_prefix</var> class variable. param: string The SQL query param: string The offset to start selection param: string The number of results to return param: string The common table prefix |
| replacePrefix( $sql, $prefix=') X-Ref |
| This function replaces a string identifier <var>$prefix</var> with the string held is the <var>_table_prefix</var> class variable. param: string The SQL query param: string The common table prefix |
| getQuery() X-Ref |
| Get the active query return: string The current value of the internal SQL vairable |
| query() X-Ref |
| Execute the query return: mixed A database resource if successful, FALSE if not. |
| getAffectedRows() X-Ref |
| Get the affected rows by the most recent query return: int The number of affected rows in the previous operation |
| queryBatch( $abort_on_error=true, $p_transaction_safe = false) X-Ref |
| Execute a batch query return: mixed A database resource if successful, FALSE if not. |
| explain() X-Ref |
| Diagnostic function |
| getNumRows( $cur=null ) X-Ref |
| Get the number of rows returned by the most recent query param: object Database resource return: int The number of rows |
| loadResult() X-Ref |
| This method loads the first field of the first row returned by the query. return: The value returned in the query or null if the query failed. |
| loadResultArray($numinarray = 0) X-Ref |
| Load an array of single field results into an array |
| loadAssoc() X-Ref |
| Fetch a result row as an associative array |
| loadAssocList( $key='' ) X-Ref |
| Load a associactive list of database rows param: string The field name of a primary key return: array If key is empty as sequential list of returned records. |
| loadObject( ) X-Ref |
| This global function loads the first row of a query into an object param: object |
| loadObjectList( $key='' ) X-Ref |
| Load a list of database objects param: string The field name of a primary key return: array If <var>key</var> is empty as sequential list of returned records. |
| loadRow() X-Ref |
| Load the first row returned by the query return: The first row of the query. |
| loadRowList( $key='' ) X-Ref |
| Load a list of database rows (numeric column indexing) If <var>key</var> is not empty then the returned array is indexed by the value the database key. Returns <var>null</var> if the query fails. param: string The field name of a primary key return: array |
| insertObject( $table, &$object, $keyName = NULL ) X-Ref |
| Inserts a row into a table based on an objects properties param: string The name of the table param: object An object whose properties match table fields param: string The name of the primary key. If provided the object property is updated. |
| updateObject( $table, &$object, $keyName, $updateNulls=true ) X-Ref |
| Update an object in the database param: string param: object param: string param: boolean |
| stderr( $showSQL = false ) X-Ref |
| Print out an error statement param: boolean If TRUE, displays the last SQL statement sent to the database return: string A standised error message |
| insertid() X-Ref |
| Get the ID generated from the previous INSERT operation return: mixed |
| getCollation() X-Ref |
| Get the database collation return: string Collation in use |
| getVersion() X-Ref |
| Get the version of the database connector |
| getTableList() X-Ref |
| List tables in a database return: array A list of all the tables in the database |
| getTableCreate( $tables ) X-Ref |
| Shows the CREATE TABLE statement that creates the given tables param: array|string A table name or a list of table names return: array A list the create SQL for the tables |
| getTableFields( $tables, $typeonly = true ) X-Ref |
| Retrieves information about the given tables param: array|string A table name or a list of table names param: boolean Only return field types, default true return: array An array of fields by table |
| Quote( $text, $escaped = true ) X-Ref |
| Get a quoted database escaped string param: string A string param: boolean Default true to escape string, false to leave the string unchanged return: string |
| GetCol( $query ) X-Ref |
| ADODB compatability function param: string SQL |
| Execute( $query ) X-Ref |
| ADODB compatability function param: string SQL return: object |
| SelectLimit( $query, $count, $offset=0 ) X-Ref |
| ADODB compatability function |
| PageExecute( $sql, $nrows, $page, $inputarr=false, $secs2cache=0 ) X-Ref |
| ADODB compatability function |
| GetRow( $query ) X-Ref |
| ADODB compatability function param: string SQL return: array |
| GetOne( $query ) X-Ref |
| ADODB compatability function param: string SQL return: mixed |
| BeginTrans() X-Ref |
| ADODB compatability function |
| RollbackTrans() X-Ref |
| ADODB compatability function |
| CommitTrans() X-Ref |
| ADODB compatability function |
| ErrorMsg() X-Ref |
| ADODB compatability function |
| ErrorNo() X-Ref |
| ADODB compatability function |
| GenID( $foo1=null, $foo2=null ) X-Ref |
| ADODB compatability function |
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |