Database object constructor
database
database
([string $host = 'localhost'], string $user, string $pass, string $db, string $table_prefix)
-
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
Diagnostic function
void
explain
()
Fudge method for ADOdb compatibility
void
GenID
([mixed $foo1 = null], [mixed $foo2 = null])
Get a database escaped string
string
getEscaped
(mixed $text)
int
getNumRows
([mixed $cur = null])
array
getTableCreate
(array $tables)
-
array
$tables: A list of table names
array
getTableFields
(array $tables)
-
array
$tables: A list of table names
Document::db_insertObject()
{ Description }
void
insertObject
(mixed $table, mixed &$object, [[type] $keyName = NULL], [[type] $verbose = false])
-
[type]
$keyName
-
[type]
$verbose
Load a assoc list of database rows
array
loadAssocList
([string $key = ''])
-
string
$key: The field name of a primary key
This global function loads the first row of a query into an object
If an object is passed to this function, the returned row is bound to the existing elements of object. If object has a value of null, then all of the returned query fields returned in the object.
void
loadObject
(string &$object, object The 1)
-
object The
1: address of variable
-
string
&$object: The SQL query
Load a list of database objects
array
loadObjectList
([string $key = ''])
-
string
$key: The field name of a primary key
This method loads the first field of the first row returned by the query.
The
loadResult
()
Load an array of single field results into an array
void
loadResultArray
(mixed $numinarray)
Load a list of database rows (numeric column indexing)
array
loadRowList
([string $key = ''])
-
string
$key: The field name of a primary key
Execute the query
mixed
query
()
void
query_batch
([mixed $abort_on_error = true], [mixed $p_transaction_safe = false])
Get a quoted database escaped string
string
Quote
(mixed $text)
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.
void
setQuery
(string $sql, [string $prefix = '#__'])
-
string
$sql: The SQL query
-
string
$prefix: The common table prefix
string
stderr
([boolean $showSQL = false])
-
boolean
$showSQL: If TRUE, displays the last SQL statement sent to the database
Document::db_updateObject()
{ Description }
void
updateObject
(mixed $table, mixed &$object, mixed $keyName, [[type] $updateNulls = true])