[ PHPXref.com ] [ Generated: Sun Jul 20 18:19:36 2008 ] [ Jaws 0.6.1 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/html/include/pear/MDB2/Driver/ -> mysql.php (summary)

(no description)

File Size: 1006 lines (35 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 classes

MDB2_Driver_mysql:: (17 methods):
  __construct()
  errorInfo()
  escape()
  quoteIdentifier()
  beginTransaction()
  commit()
  rollback()
  connect()
  disconnect()
  _doQuery()
  _affectedRows()
  _modifyQuery()
  getServerVersion()
  replace()
  nextID()
  lastInsertID()
  currID()

MDB2_Result_mysql:: (4 methods):
  fetchRow()
  _getColumnNames()
  numCols()
  free()

MDB2_BufferedResult_mysql:: (3 methods):
  seek()
  valid()
  numRows()

MDB2_Statement_mysql:: (0 methods):


Class: MDB2_Driver_mysql  - X-Ref

MDB2 MySQL driver

__construct()   X-Ref
Constructor


errorInfo($error = null)   X-Ref
This method is used to collect information about an error

param: integer $error
return: array

escape($text)   X-Ref
Quotes a string so it can be safely used in a query. It will quote
the text so it can safely be used within a query.

param: string $text the input string to quote
return: string quoted string

quoteIdentifier($str, $check_option = false)   X-Ref
Quote a string so it can be safely used as a table or column name

Quoting style depends on which database driver is being used.

MySQL can't handle the backtick character (<kbd>`</kbd>) in
table or column names.

param: string $str  identifier name to be quoted
param: bool   $check_option  check the 'quote_identifier' option
return: string  quoted identifier string

beginTransaction()   X-Ref
Start a transaction.

return: mixed MDB2_OK on success, a MDB2 error on failure

commit()   X-Ref
Commit the database changes done during a transaction that is in
progress.

return: mixed MDB2_OK on success, a MDB2 error on failure

rollback()   X-Ref
Cancel any database changes done during a transaction that is in
progress.

return: mixed MDB2_OK on success, a MDB2 error on failure

connect()   X-Ref
Connect to the database

return: true on success, MDB2 Error Object on failure

disconnect($force = true)   X-Ref
Log out and disconnect from the database.

return: mixed true on success, false if not connected and error

_doQuery($query, $is_manip = false, $connection = null, $database_name = null)   X-Ref
Execute a query

param: string $query  query
param: boolean $is_manip  if the query is a manipulation query
param: resource $connection
param: string $database_name
return: result or error object

_affectedRows($connection, $result = null)   X-Ref
returns the number of rows affected

param: resource $result
param: resource $connection
return: mixed MDB2 Error Object or the number of rows affected

_modifyQuery($query, $is_manip, $limit, $offset)   X-Ref
Changes a query string for various DBMS specific reasons

param: string $query  query to modify
return: the new (modified) query

getServerVersion($native = false)   X-Ref
return version information about the server

param: string     $native  determines if the raw version string should be returned
return: mixed array/string with version information or MDB2 error object

replace($table, $fields)   X-Ref
Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT
query, except that if there is already a row in the table with the same
key field values, the REPLACE query just updates its values instead of
inserting a new row.

The REPLACE type of query does not make part of the SQL standards. Since
practically only MySQL implements it natively, this type of query is
emulated through this method for other DBMS using standard types of
queries inside a transaction to assure the atomicity of the operation.

param: string $table name of the table on which the REPLACE query will
param: array $fields associative array that describes the fields and the
return: mixed MDB2_OK on success, a MDB2 error on failure

nextID($seq_name, $ondemand = true)   X-Ref
returns the next free id of a sequence

param: string $seq_name name of the sequence
param: boolean $ondemand when true the seqence is
return: mixed MDB2 Error Object or id

lastInsertID($table = null, $field = null)   X-Ref
returns the autoincrement ID if supported or $id

param: mixed $id value as returned by getBeforeId()
param: string $table name of the table into which a new row was inserted
return: mixed MDB2 Error Object or id

currID($seq_name)   X-Ref
returns the current id of a sequence

param: string $seq_name name of the sequence
return: mixed MDB2 Error Object or id

Class: MDB2_Result_mysql  - X-Ref

fetchRow($fetchmode = MDB2_FETCHMODE_DEFAULT, $rownum = null)   X-Ref
Fetch a row and insert the data into an existing array.

param: int       $fetchmode  how the array data should be indexed
param: int    $rownum    number of the row where the data can be found
return: int data array on success, a MDB2 error on failure

_getColumnNames()   X-Ref
Retrieve the names of columns returned by the DBMS in a query result.

return: mixed                an associative array variable

numCols()   X-Ref
Count the number of columns returned by the DBMS in a query result.

return: mixed integer value with the number of columns, a MDB2 error

free()   X-Ref
Free the internal resources associated with result.

return: boolean true on success, false if result is invalid

Class: MDB2_BufferedResult_mysql  - X-Ref

seek($rownum = 0)   X-Ref
seek to a specific row in a result set

param: int    $rownum    number of the row where the data can be found
return: mixed MDB2_OK on success, a MDB2 error on failure

valid()   X-Ref
check if the end of the result set has been reached

return: mixed true or false on sucess, a MDB2 error on failure

numRows()   X-Ref
returns the number of rows in a result object

return: mixed MDB2 Error Object or the number of rows

Class: MDB2_Statement_mysql  - X-Ref



[ Powered by PHPXref - Served by Debian GNU/Linux ]