Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class JDatabaseMySQL

Description

MySQL database driver

Located in /joomla/database/database/mysql.php (line 25)

Class JObject   (Subpackage Base)

Abstract class JDatabase
   
   Class JDatabaseMySQL   (Subpackage Database)
Variable Summary
Variable string $name
Variable string $_nameQuote
Variable string $_nullDate
Method Summary
Constructor JDatabaseMySQL __construct ([string $host = 'localhost'], string $user, string $pass, [string $db = ''], [string $table_prefix = ''])
Destructor boolean __destruct ()
Method void explain ()
Method string getCollation ()
Method string getEscaped ( $text)
Method int getNumRows ([ $cur = null])
Method array getTableCreate (array $tables)
Method array getTableFields (array $tables)
Method array getTableList ()
Method void getVersion ()
Method void hasUTF ()
Method void insertid ()
Method void insertObject (string $table, object An &$object, [string $keyName = NULL])
Method void loadAssoc ()
Method array loadAssocList ([string $key = ''])
Method void loadObject ()
Method array loadObjectList ([string $key = ''])
Method The loadResult ()
Method void loadResultArray ([ $numinarray = 0])
Method The loadRow ()
Method array loadRowList ([string $key = null])
Method mixed query ()
Method mixed queryBatch ([ $abort_on_error = true], [ $p_transaction_safe = false])
Method void setUTF ()
Method void updateObject ( $table,  &$object,  $keyName, [[type] $updateNulls = true])
Variables
string $name = 'mysql' (line 28)
  • var: The database driver name

Redefinition of:
JDatabase::$name
string $_nameQuote = '`' (line 32)
  • var: Quote for named objects

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

Redefinition of:
JDatabase::$_nullDate

Inherited Variables

Inherited from JDatabase

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

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
Destructor __destruct (line 78)

Database object destructor

  • since: 1.5
boolean __destruct ()
explain (line 198)

Diagnostic function

void explain ()

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

Redefinition of:
JDatabase::getAffectedRows()
Get the affected rows by the most recent query
getCollation (line 468)

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

  • return: Collation in use
string getCollation ()

Redefinition of:
JDatabase::getCollation()
Get the database collation
getEscaped (line 109)

Get a database escaped string

string getEscaped ( $text)
  • $text

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

Redefinition of:
JDatabase::getNumRows()
Get the number of rows returned by the most recent query
getTableCreate (line 491)
  • 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 509)
  • return: An array of fields by table
array getTableFields (array $tables)
  • array $tables: A list of table names

Redefinition of:
JDatabase::getTableFields()
List database table fields
getTableList (line 482)
  • return: A list of all the tables in the database
array getTableList ()

Redefinition of:
JDatabase::getTableList()
List tables in a database
getVersion (line 460)
void getVersion ()

Redefinition of:
JDatabase::getVersion()
Get the version of the database connector
hasUTF (line 90)

Determines UTF support

void hasUTF ()

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

Redefinition of:
JDatabase::insertid()
Get the ID generated from the previous INSERT operation
insertObject (line 397)

Inserts a row into a table based on an objects properties

void insertObject (string $table, object An &$object, [string $keyName = NULL])
  • string $table: The name of the table
  • object An &$object: object whose properties match table fields
  • string $keyName: The name of the primary key. If provided the object property is updated.

Redefinition of:
JDatabase::insertObject()
Inserts a row into a table based on an objects properties
loadAssoc (line 279)

Fetch a result row as an associative array

return array

void loadAssoc ()

Redefinition of:
JDatabase::loadAssoc()
Fetch a result row as an associative array
loadAssocList (line 297)

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 associactive list of database rows
loadObject (line 318)

This global function loads the first row of a query into an object

return object

void loadObject ()

Redefinition of:
JDatabase::loadObject()
This global function loads the first row of a query into an object
loadObjectList (line 337)

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 246)

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 261)

Load an array of single field results into an array

void loadResultArray ( $numinarray)
  • $numinarray

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

Redefinition of:
JDatabase::loadRow()
Load the first row returned by the query
loadRowList (line 375)

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 = null])
  • string $key: The field name of a primary key

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

Execute the query

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

Redefinition of:
JDatabase::query()
Execute the query
queryBatch (line 161)

Execute a batch query

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

Redefinition of:
JDatabase::queryBatch()
Execute a batch query
setUTF (line 99)

Custom settings for UTF support

void setUTF ()

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

Document::db_updateObject()

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

Redefinition of:
JDatabase::updateObject()
Update ab object in the database

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::getQuery()
 JDatabase::GetRow()
 JDatabase::getTableCreate()
 JDatabase::getTableFields()
 JDatabase::getTableList()
 JDatabase::getUTFSupport()
 JDatabase::getVersion()
 JDatabase::hasUTF()
 JDatabase::insertid()
 JDatabase::insertObject()
 JDatabase::isQuoted()
 JDatabase::loadAssoc()
 JDatabase::loadAssocList()
 JDatabase::loadObject()
 JDatabase::loadObjectList()
 JDatabase::loadResult()
 JDatabase::loadResultArray()
 JDatabase::loadRow()
 JDatabase::loadRowList()
 JDatabase::nameQuote()
 JDatabase::PageExecute()
 JDatabase::query()
 JDatabase::queryBatch()
 JDatabase::Quote()
 JDatabase::replacePrefix()
 JDatabase::RollbackTrans()
 JDatabase::SelectLimit()
 JDatabase::setQuery()
 JDatabase::setUTF()
 JDatabase::stderr()
 JDatabase::updateObject()

Inherited From JObject

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

Documentation generated on Mon, 05 Mar 2007 21:11:35 +0000 by phpDocumentor 1.3.1