Class JDatabaseMySQL

Description

MySQL database driver

Located in /database/database/mysql.php (line 21)

JObject
   |
   --JDatabase
      |
      --JDatabaseMySQL
Direct descendents
Class Description
 class database Legacy class, use JDatabase
Variable Summary
 string $_nameQuote
 string $_nullDate
Method Summary
 JDatabaseMySQL __construct ([string $host = 'localhost'], string $user, string $pass, [string $db = ''], [string $table_prefix = ''])
 void explain ()
 string getCollation ()
 string getEscaped (mixed $text)
 int getNumRows ([mixed $cur = null])
 array getTableCreate (array $tables)
 array getTableFields (array $tables)
 array getTableList ()
 void getVersion ()
 void hasUTF ()
 void insertid ()
 void insertObject (mixed $table, mixed &$object, [[type] $keyName = NULL], [[type] $verbose = false])
 array loadAssocList ([string $key = ''])
 void loadObject (string &$object, object The 1)
 array loadObjectList ([string $key = ''])
 The loadResult ()
 void loadResultArray (mixed $numinarray)
 The loadRow ()
 array loadRowList ([string $key = ''])
 mixed query ()
 mixed query_batch ([mixed $abort_on_error = true], [mixed $p_transaction_safe = false])
 void setUTF ()
 void updateObject (mixed $table, mixed &$object, mixed $keyName, [[type] $updateNulls = true])
Variables
string $_nameQuote = '`' (line 26)
  • var: Quote for named objects

Redefinition of:
JDatabase::$_nameQuote
string $_nullDate = '0000-00-00 00:00:00' (line 24)
  • var: The null/zero date string

Redefinition of:
JDatabase::$_nullDate

Inherited Variables

Inherited from JDatabase

JDatabase::$_cursor
JDatabase::$_debug
JDatabase::$_errorMsg
JDatabase::$_errorNum
JDatabase::$_hasQuoted
JDatabase::$_limit
JDatabase::$_log
JDatabase::$_offset
JDatabase::$_quoted
JDatabase::$_resource
JDatabase::$_sql
JDatabase::$_table_prefix
JDatabase::$_ticker
JDatabase::$_utf
Methods
Constructor __construct (line 36)

Database object constructor

JDatabaseMySQL __construct ([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

Redefinition of:
JDatabase::__construct()
Database object constructor

Redefined in descendants as:
explain (line 165)

Diagnostic function

void explain ()

Redefinition of:
JDatabase::explain()
Diagnostic function
getAffectedRows (line 120)
  • return: The number of affected rows in the previous operation
  • since: 1.0.5
int getAffectedRows ()

Redefinition of:
JDatabase::getAffectedRows()
getCollation (line 434)

Assumes database collation in use by sampling one text field in one table

  • return: Collation in use
string getCollation ()

Redefinition of:
JDatabase::getCollation()
getEscaped (line 82)

Get a database escaped string

string getEscaped (mixed $text)

Redefinition of:
JDatabase::getEscaped()
Get a database escaped string
getNumRows (line 203)
  • return: The number of rows returned from the most recent query.
int getNumRows ([mixed $cur = null])

Redefinition of:
JDatabase::getNumRows()
getTableCreate (line 453)
  • return: A list the create SQL for the tables
array getTableCreate (array $tables)
  • array $tables: A list of table names

Redefinition of:
JDatabase::getTableCreate()
getTableFields (line 471)
  • return: An array of fields by table
array getTableFields (array $tables)
  • array $tables: A list of table names

Redefinition of:
JDatabase::getTableFields()
getTableList (line 444)
  • return: A list of all the tables in the database
array getTableList ()

Redefinition of:
JDatabase::getTableList()
getVersion (line 427)
void getVersion ()

Redefinition of:
JDatabase::getVersion()
hasUTF (line 65)

Determines UTF support

void hasUTF ()

Redefinition of:
JDatabase::hasUTF()
Determines UTF support
insertid (line 423)
void insertid ()

Redefinition of:
JDatabase::insertid()
insertObject (line 364)

Document::db_insertObject()

{ Description }

void insertObject (mixed $table, mixed &$object, [[type] $keyName = NULL], [[type] $verbose = false])
  • [type] $keyName
  • [type] $verbose

Redefinition of:
JDatabase::insertObject()
loadAssocList (line 244)

Load a assoc list of database rows

  • return: If key is empty as sequential list of returned records.
array loadAssocList ([string $key = ''])
  • string $key: The field name of a primary key

Redefinition of:
JDatabase::loadAssocList()
Load a assoc list of database rows
loadObject (line 268)

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

Redefinition of:
JDatabase::loadObject()
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.
loadObjectList (line 302)

Load a list of database objects

  • return: If key is empty as sequential list of returned records. If key is not empty then the returned array is indexed by the value the database key. Returns null if the query fails.
array loadObjectList ([string $key = ''])
  • string $key: The field name of a primary key

Redefinition of:
JDatabase::loadObjectList()
Load a list of database objects
loadResult (line 212)

This method loads the first field of the first row returned by the query.

  • return: value returned in the query or null if the query failed.
The loadResult ()

Redefinition of:
JDatabase::loadResult()
This method loads the first field of the first row returned by the query.
loadResultArray (line 227)

Load an array of single field results into an array

void loadResultArray (mixed $numinarray)

Redefinition of:
JDatabase::loadResultArray()
Load an array of single field results into an array
loadRow (line 321)
  • return: first row of the query.
The loadRow ()

Redefinition of:
JDatabase::loadRow()
loadRowList (line 340)

Load a list of database rows (numeric column indexing)

  • return: If key is empty as sequential list of returned records. If key is not empty then the returned array is indexed by the value the database key. Returns null if the query fails.
array loadRowList ([string $key = ''])
  • string $key: The field name of a primary key

Redefinition of:
JDatabase::loadRowList()
Load a list of database rows (numeric column indexing)
query (line 90)

Execute the query

  • return: A database resource if successful, FALSE if not.
mixed query ()

Redefinition of:
JDatabase::query()
Execute the query
query_batch (line 128)

Execute a batch query

  • return: A database resource if successful, FALSE if not.
mixed query_batch ([mixed $abort_on_error = true], [mixed $p_transaction_safe = false])

Redefinition of:
JDatabase::query_batch()
Execute a batch query
setUTF (line 73)

Custom settings for UTF support

void setUTF ()

Redefinition of:
JDatabase::setUTF()
Custom settings for UTF support
updateObject (line 395)

Document::db_updateObject()

void updateObject (mixed $table, mixed &$object, mixed $keyName, [[type] $updateNulls = true])
  • [type] $updateNulls

Redefinition of:
JDatabase::updateObject()

Inherited Methods

Inherited From JDatabase

 JDatabase::__construct()
 JDatabase::addQuoted()
 JDatabase::BeginTrans()
 JDatabase::CommitTrans()
 JDatabase::debug()
 JDatabase::ErrorMsg()
 JDatabase::ErrorNo()
 JDatabase::Execute()
 JDatabase::explain()
 JDatabase::GenID()
 JDatabase::getAffectedRows()
 JDatabase::GetCol()
 JDatabase::getCollation()
 JDatabase::getErrorMsg()
 JDatabase::getErrorNum()
 JDatabase::getEscaped()
 JDatabase::getInstance()
 JDatabase::getNullDate()
 JDatabase::getNumRows()
 JDatabase::GetOne()
 JDatabase::getPrefix()
 JDatabase::getPublicProperties()
 JDatabase::getQuery()
 JDatabase::GetRow()
 JDatabase::getTableCreate()
 JDatabase::getTableFields()
 JDatabase::getTableList()
 JDatabase::getUtfSupport()
 JDatabase::getVersion()
 JDatabase::hasUTF()
 JDatabase::insertid()
 JDatabase::insertObject()
 JDatabase::isQuoted()
 JDatabase::loadAssocList()
 JDatabase::loadObject()
 JDatabase::loadObjectList()
 JDatabase::loadResult()
 JDatabase::loadResultArray()
 JDatabase::loadRow()
 JDatabase::loadRowList()
 JDatabase::NameQuote()
 JDatabase::PageExecute()
 JDatabase::query()
 JDatabase::query_batch()
 JDatabase::Quote()
 JDatabase::replacePrefix()
 JDatabase::RollbackTrans()
 JDatabase::SelectLimit()
 JDatabase::setQuery()
 JDatabase::setUTF()
 JDatabase::stderr()
 JDatabase::updateObject()

Inherited From JObject

 JObject::__construct()
 JObject::JObject()
 JObject::get()
 JObject::set()
 JObject::toString()
 JObject::__destruct()

Documentation generated on Sat, 4 Feb 2006 14:24:41 +0100 by phpDocumentor 1.3.0RC4