## Zend_Db_Adapter_Pdo_Abstract

Description

Class for connecting to SQL databases and performing common operations using PDO.

- abstract:
- license: New BSD License
- copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Db/Adapter/Pdo/Abstract.php (line 34)

    Zend_Db_Adapter_Abstract
       |
       --Zend_Db_Adapter_Pdo_Abstract

Direct descendents

Class | Description
--- | ---
Zend_Db_Adapter_Pdo_Mssql | Class for connecting to Microsoft SQL Server databases and performing common operations.
Zend_Db_Adapter_Pdo_Mysql | Class for connecting to MySQL databases and performing common operations.
Zend_Db_Adapter_Pdo_Oci | Class for connecting to Oracle databases and performing common operations.
Zend_Db_Adapter_Pdo_Pgsql | Class for connecting to MySQL databases and performing common operations.
Zend_Db_Adapter_Pdo_Sqlite | Class for connecting to MySQL databases and performing common operations.

Method Summary
integer lastInsertId ([string $sequenceName = null])
PDOStatement prepare (string $sql, array $bind)
Zend_Db_Pdo_Statement query (string|Zend_Db_Select $sql, [array $bind = array()])
void setFetchMode (int $mode)
void _beginTransaction ()
void _commit ()
void _connect ()
string _dsn ()
string _quote (string $value)
void _rollBack ()
Variables

#### Inherited Variables

Inherited from Zend_Db_Adapter_Abstract

> Zend_Db_Adapter_Abstract::$_config
> Zend_Db_Adapter_Abstract::$_connection
> Zend_Db_Adapter_Abstract::$_fetchMode
> Zend_Db_Adapter_Abstract::$_profiler

Methods
lastInsertId (line 126)

Gets the last inserted ID.

- access: public

integer lastInsertId ([string $sequenceName = null])

- string $sequenceName: Table or sequence name needed for some PDO drivers

Redefinition of:

Zend_Db_Adapter_Abstract::lastInsertId()
  Gets the last inserted ID.

Redefined in descendants as:

- Zend_Db_Adapter_Pdo_Mssql::lastInsertId() : Gets the last inserted ID.
- Zend_Db_Adapter_Pdo_Oci::lastInsertId() : Gets the last inserted ID.
- Zend_Db_Adapter_Pdo_Pgsql::lastInsertId() : Gets the last inserted ID.

prepare (line 114)

Prepares an SQL statement.

- access: public

PDOStatement prepare (string $sql, array $bind)

- string $sql: The SQL statement with placeholders.
- array $bind: An array of data to bind to the placeholders.

Redefinition of:

Zend_Db_Adapter_Abstract::prepare()
  Prepare a statement and return a PDOStatement-like object.

query (line 140)

Special handling for PDO query().

All bind parameter names must begin with ':'

- access: public

Zend_Db_Pdo_Statement query (string|Zend_Db_Select $sql, [array $bind = array()])

- string|Zend_Db_Select $sql: The SQL statement with placeholders.
- array $bind: An array of data to bind to the placeholders.

Redefinition of:

Zend_Db_Adapter_Abstract::query()
  Prepares and executes an SQL statement with bound data.

setFetchMode (line 196)

Set the PDO fetch mode.

- access: public
- todo: Support FETCH_CLASS and FETCH_INTO.

void setFetchMode (int $mode)

- int $mode: A PDO fetch mode.

Redefinition of:

Zend_Db_Adapter_Abstract::setFetchMode()
  Set the fetch mode.

_beginTransaction (line 157)

Begin a transaction.

- access: protected

void _beginTransaction ()

Redefinition of:

Zend_Db_Adapter_Abstract::_beginTransaction()
  Begin a transaction.

_commit (line 165)

Commit a transaction.

- access: protected

void _commit ()

Redefinition of:

Zend_Db_Adapter_Abstract::_commit()
  Commit a transaction.

_connect (line 65)

Creates a PDO object and connects to the database.

- access: protected
- throws: Zend_Db_Adapter_Exception

void _connect ()

Redefinition of:

Zend_Db_Adapter_Abstract::_connect()
  Creates a connection to the database.

_dsn (line 42)

Creates a PDO DSN for the adapter from $this->_config settings.

- access: protected

string _dsn ()

Redefined in descendants as:

- Zend_Db_Adapter_Pdo_Mssql::_dsn() : Creates a PDO DSN for the adapter from $this->_config settings.
- Zend_Db_Adapter_Pdo_Oci::_dsn() : Creates a PDO DSN for the adapter from $this->_config settings.
- Zend_Db_Adapter_Pdo_Sqlite::_dsn() : DSN builder

_quote (line 183)

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.

Redefined in descendants as:

- Zend_Db_Adapter_Pdo_Oci::_quote() : Quote a raw string.

_rollBack (line 173)

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::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::limit()
> Zend_Db_Adapter_Abstract::listTables()
> Zend_Db_Adapter_Abstract::prepare()
> Zend_Db_Adapter_Abstract::query()
> Zend_Db_Adapter_Abstract::quote()
> Zend_Db_Adapter_Abstract::quoteIdentifier()
> Zend_Db_Adapter_Abstract::quoteInto()
> 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::_rollBack()

Documentation generated on Wed, 21 Feb 2007 11:45:19 -0800 by phpDocumentor 1.3.1