Class Zend_Db_Adapter_Mysqli

Description

Class for connecting to SQL databases and performing common operations.

  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Db/Adapter/Mysqli.php (line 43)

Zend_Db_Adapter_Abstract
   |
   --Zend_Db_Adapter_Mysqli
Method Summary
 void closeConnection ()
 array describeTable (string $tableName, [string $schemaName = null])
 integer lastInsertId ([string $tableName = null], [string $primaryKey = 'id'])
 string limit (string $sql, int $count, [int $offset = 0])
 array listTables ()
 void setFetchMode (int $mode)
 void _commit ()
 void _connect ()
 string _quote (string $value)
 void _rollBack ()
Variables
Methods
closeConnection (line 217)

Force the connection to close.

  • access: public
void closeConnection ()

Redefinition of:
Zend_Db_Adapter_Abstract::closeConnection()
Force the connection to close.
describeTable (line 117)

Returns the column descriptions for a table.

The return value is an associative array keyed by the column name, as returned by the RDBMS.

The value of each array element is an associative array with the following keys:

SCHEMA_NAME => string; name of database or schema TABLE_NAME => string; COLUMN_NAME => string; column name COLUMN_POSITION => number; ordinal position of column in table DATA_TYPE => string; SQL datatype name of column DEFAULT => string; default expression of column, null if none NULLABLE => boolean; true if column can have nulls LENGTH => number; length of CHAR/VARCHAR SCALE => number; scale of NUMERIC/DECIMAL PRECISION => number; precision of NUMERIC/DECIMAL UNSIGNED => boolean; unsigned property of an integer type PRIMARY => boolean; true if column is part of the primary key PRIMARY_POSITION => integer; position of column in primary key

  • access: public
array describeTable (string $tableName, [string $schemaName = null])
  • string $tableName
  • string $schemaName: OPTIONAL

Redefinition of:
Zend_Db_Adapter_Abstract::describeTable()
Returns the column descriptions for a table.
getQuoteIdentifierSymbol (line 63)

Returns the symbol the adapter uses for delimiting identifiers.

  • access: public
string getQuoteIdentifierSymbol ()

Redefinition of:
Zend_Db_Adapter_Abstract::getQuoteIdentifierSymbol()
Returns the symbol the adapter uses for delimited identifiers.
lastInsertId (line 253)

Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column.

As a convention, on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL, DB2), this method forms the name of a sequence from the arguments and returns the last id generated by that sequence. On RDBMS brands that support IDENTITY/AUTOINCREMENT columns, this method returns the last value generated for such a column, and the table name argument is disregarded.

MySQL does not support sequences, so $tableName and $primaryKey are ignored.

  • access: public
integer lastInsertId ([string $tableName = null], [string $primaryKey = 'id'])
  • string $tableName: OPTIONAL Name of table.
  • string $primaryKey: OPTIONAL Name of primary key column.

Redefinition of:
Zend_Db_Adapter_Abstract::lastInsertId()
Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column.
limit (line 324)

Adds an adapter-specific LIMIT clause to the SELECT statement.

  • access: public
string limit (string $sql, int $count, int $offset)
  • string $sql
  • int $count
  • int $offset: OPTIONAL

Redefinition of:
Zend_Db_Adapter_Abstract::limit()
Adds an adapter-specific LIMIT clause to the SELECT statement.
listTables (line 73)

Returns a list of the tables in the database.

  • access: public
array listTables ()

Redefinition of:
Zend_Db_Adapter_Abstract::listTables()
Returns a list of the tables in the database.
prepare (line 229)

Prepare a statement and return a PDOStatement-like object.

  • access: public
Zend_Db_Statement_Mysqli prepare (string $sql)
  • string $sql: SQL query

Redefinition of:
Zend_Db_Adapter_Abstract::prepare()
Prepare a statement and return a PDOStatement-like object.
setFetchMode (line 298)

Set the fetch mode.

  • access: public
void setFetchMode (int $mode)
  • int $mode

Redefinition of:
Zend_Db_Adapter_Abstract::setFetchMode()
Set the fetch mode.
_beginTransaction (line 264)

Begin a transaction.

  • access: protected
void _beginTransaction ()

Redefinition of:
Zend_Db_Adapter_Abstract::_beginTransaction()
Begin a transaction.
_commit (line 275)

Commit a transaction.

  • access: protected
void _commit ()

Redefinition of:
Zend_Db_Adapter_Abstract::_commit()
Commit a transaction.
_connect (line 193)

Creates a connection to the database.

  • access: protected
  • throws: Zend_Db_Adapter_Mysqli_Exception
void _connect ()

Redefinition of:
Zend_Db_Adapter_Abstract::_connect()
Creates a connection to the database.
_quote (line 52)

Quote a raw string.

  • return: Quoted string
  • access: protected
string _quote (string $value)
  • string $value: Raw string

Redefinition of:
Zend_Db_Adapter_Abstract::_quote()
Quote a raw string.
_rollBack (line 286)

Roll-back a transaction.

  • access: protected
void _rollBack ()

Redefinition of:
Zend_Db_Adapter_Abstract::_rollBack()
Roll-back a transaction.

Inherited Methods

Inherited From Zend_Db_Adapter_Abstract

 Zend_Db_Adapter_Abstract::__construct()
 Zend_Db_Adapter_Abstract::beginTransaction()
 Zend_Db_Adapter_Abstract::closeConnection()
 Zend_Db_Adapter_Abstract::commit()
 Zend_Db_Adapter_Abstract::delete()
 Zend_Db_Adapter_Abstract::describeTable()
 Zend_Db_Adapter_Abstract::fetchAll()
 Zend_Db_Adapter_Abstract::fetchAssoc()
 Zend_Db_Adapter_Abstract::fetchCol()
 Zend_Db_Adapter_Abstract::fetchOne()
 Zend_Db_Adapter_Abstract::fetchPairs()
 Zend_Db_Adapter_Abstract::fetchRow()
 Zend_Db_Adapter_Abstract::getConnection()
 Zend_Db_Adapter_Abstract::getFetchMode()
 Zend_Db_Adapter_Abstract::getProfiler()
 Zend_Db_Adapter_Abstract::getQuoteIdentifierSymbol()
 Zend_Db_Adapter_Abstract::insert()
 Zend_Db_Adapter_Abstract::lastInsertId()
 Zend_Db_Adapter_Abstract::lastSequenceId()
 Zend_Db_Adapter_Abstract::limit()
 Zend_Db_Adapter_Abstract::listTables()
 Zend_Db_Adapter_Abstract::nextSequenceId()
 Zend_Db_Adapter_Abstract::prepare()
 Zend_Db_Adapter_Abstract::query()
 Zend_Db_Adapter_Abstract::quote()
 Zend_Db_Adapter_Abstract::quoteColumnAs()
 Zend_Db_Adapter_Abstract::quoteIdentifier()
 Zend_Db_Adapter_Abstract::quoteInto()
 Zend_Db_Adapter_Abstract::quoteTableAs()
 Zend_Db_Adapter_Abstract::rollBack()
 Zend_Db_Adapter_Abstract::select()
 Zend_Db_Adapter_Abstract::setFetchMode()
 Zend_Db_Adapter_Abstract::update()
 Zend_Db_Adapter_Abstract::_beginTransaction()
 Zend_Db_Adapter_Abstract::_commit()
 Zend_Db_Adapter_Abstract::_connect()
 Zend_Db_Adapter_Abstract::_quote()
 Zend_Db_Adapter_Abstract::_quoteIdentifier()
 Zend_Db_Adapter_Abstract::_quoteIdentifierAs()
 Zend_Db_Adapter_Abstract::_rollBack()

Documentation generated on Fri, 06 Apr 2007 18:27:54 -0700 by phpDocumentor 1.3.1