[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/libraries/joomla/database/database/ -> mysql.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 849 lines (21 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

JDatabaseMySQL:: (34 methods):
  __construct()
  __destruct()
  escape()
  test()
  connected()
  dropTable()
  getAffectedRows()
  getCollation()
  getExporter()
  getImporter()
  getNumRows()
  getQuery()
  getTableCreate()
  getTableColumns()
  getTableKeys()
  getTableList()
  getVersion()
  hasUTF()
  insertid()
  lockTable()
  query()
  renameTable()
  select()
  setUTF()
  transactionCommit()
  transactionRollback()
  transactionStart()
  fetchArray()
  fetchAssoc()
  fetchObject()
  freeResult()
  explain()
  queryBatch()
  unlockTables()


Class: JDatabaseMySQL  - X-Ref

MySQL database driver

__construct($options)   X-Ref
Constructor.

param: array  $options  Array of database options with keys: host, user, password, database, select.

__destruct()   X-Ref
Destructor.


escape($text, $extra = false)   X-Ref
Method to escape a string for usage in an SQL statement.

param: string   $text   The string to be escaped.
param: boolean  $extra  Optional parameter to provide extra escaping.
return: string  The escaped string.

test()   X-Ref
Test to see if the MySQL connector is available.

return: boolean  True on success, false otherwise.

connected()   X-Ref
Determines if the connection to the server is active.

return: boolean  True if connected to the database engine.

dropTable($tableName, $ifExists = true)   X-Ref
Drops a table from the database.

param: string   $tableName  The name of the database table to drop.
param: boolean  $ifExists   Optionally specify that the table must exist before it is dropped.
return: JDatabaseMySQL  Returns this object to support chaining.

getAffectedRows()   X-Ref
Get the number of affected rows for the previous executed SQL statement.

return: integer  The number of affected rows.

getCollation()   X-Ref
Method to get the database collation in use by sampling a text field of a table in the database.

return: mixed  The collation in use by the database (string) or boolean false if not supported.

getExporter()   X-Ref
Gets an exporter class object.

return: JDatabaseExporterMySQL  An exporter object.

getImporter()   X-Ref
Gets an importer class object.

return: JDatabaseImporterMySQL  An importer object.

getNumRows($cursor = null)   X-Ref
Get the number of returned rows for the previous executed SQL statement.

param: resource  $cursor  An optional database cursor resource to extract the row count from.
return: integer   The number of returned rows.

getQuery($new = false)   X-Ref
Get the current or query, or new JDatabaseQuery object.

param: boolean  $new  False to return the last query set, True to return a new JDatabaseQuery object.
return: mixed  The current value of the internal SQL variable or a new JDatabaseQuery object.

getTableCreate($tables)   X-Ref
Shows the table CREATE statement that creates the given tables.

param: mixed  $tables  A table name or a list of table names.
return: array  A list of the create SQL for the tables.

getTableColumns($table, $typeOnly = true)   X-Ref
Retrieves field information about a given table.

param: string   $table     The name of the database table.
param: boolean  $typeOnly  True to only return field types.
return: array  An array of fields for the database table.

getTableKeys($table)   X-Ref
Get the details list of keys for a table.

param: string  $table  The name of the table.
return: array  An array of the column specification for the table.

getTableList()   X-Ref
Method to get an array of all tables in the database.

return: array  An array of all the tables in the database.

getVersion()   X-Ref
Get the version of the database connector.

return: string  The database connector version.

hasUTF()   X-Ref
Determines if the database engine supports UTF-8 character encoding.

return: boolean  True if supported.

insertid()   X-Ref
Method to get the auto-incremented value from the last INSERT statement.

return: integer  The value of the auto-increment field from the last inserted row.

lockTable($table)   X-Ref
Locks a table in the database.

param: string  $table  The name of the table to unlock.
return: JDatabaseMySQL  Returns this object to support chaining.

query()   X-Ref
Execute the SQL statement.

return: mixed  A database cursor resource on success, boolean false on failure.

renameTable($oldTable, $newTable, $backup = null, $prefix = null)   X-Ref
Renames a table in the database.

param: string  $oldTable  The name of the table to be renamed
param: string  $newTable  The new name for the table.
param: string  $backup    Not used by MySQL.
param: string  $prefix    Not used by MySQL.
return: JDatabase  Returns this object to support chaining.

select($database)   X-Ref
Select a database for use.

param: string  $database  The name of the database to select for use.
return: boolean  True if the database was successfully selected.

setUTF()   X-Ref
Set the connection to use UTF-8 character encoding.

return: boolean  True on success.

transactionCommit()   X-Ref
Method to commit a transaction.

return: void

transactionRollback()   X-Ref
Method to roll back a transaction.

return: void

transactionStart()   X-Ref
Method to initialize a transaction.

return: void

fetchArray($cursor = null)   X-Ref
Method to fetch a row from the result set cursor as an array.

param: mixed  $cursor  The optional result set cursor from which to fetch the row.
return: mixed  Either the next row from the result set or false if there are no more rows.

fetchAssoc($cursor = null)   X-Ref
Method to fetch a row from the result set cursor as an associative array.

param: mixed  $cursor  The optional result set cursor from which to fetch the row.
return: mixed  Either the next row from the result set or false if there are no more rows.

fetchObject($cursor = null, $class = 'stdClass')   X-Ref
Method to fetch a row from the result set cursor as an object.

param: mixed   $cursor  The optional result set cursor from which to fetch the row.
param: string  $class   The class name to use for the returned row object.
return: mixed   Either the next row from the result set or false if there are no more rows.

freeResult($cursor = null)   X-Ref
Method to free up the memory used for the result set.

param: mixed  $cursor  The optional result set cursor from which to fetch the row.
return: void

explain()   X-Ref
Diagnostic method to return explain information for a query.

return: string  The explain output.

queryBatch($abortOnError = true, $transactionSafe = false)   X-Ref
Execute a query batch.

param: boolean  $abortOnError     Abort on error.
param: boolean  $transactionSafe  Transaction safe queries.
return: mixed  A database resource if successful, false if not.

unlockTables()   X-Ref
Unlocks tables in the database.

return: JDatabaseMySQL  Returns this object to support chaining.



Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1