Overview

Packages

  • Auth
  • Config
  • Controller
  • Date
  • Db
  • Feed
    • Abstract
    • Writers
  • File
    • Decorator
  • Form
    • Element
  • Image
  • Log
    • Writer
  • Net
    • Exception
    • REST
  • None
  • PHP
  • PHPMailer
  • Session
  • Util
  • Validate
    • Validator
  • Zend
    • Db
      • Adapter
      • Expr
      • Profiler
      • Select
      • Statement
      • Table
    • Loader
      • Autoloader
      • PluginLoader
    • Registry

Classes

  • Zend_Db_Adapter_Abstract
  • Zend_Db_Adapter_Db2
  • Zend_Db_Adapter_Mysqli
  • Zend_Db_Adapter_Oracle
  • Zend_Db_Adapter_Pdo_Abstract
  • Zend_Db_Adapter_Pdo_Ibm
  • Zend_Db_Adapter_Pdo_Ibm_Db2
  • Zend_Db_Adapter_Pdo_Ibm_Ids
  • Zend_Db_Adapter_Pdo_Mssql
  • Zend_Db_Adapter_Pdo_Mysql
  • Zend_Db_Adapter_Pdo_Oci
  • Zend_Db_Adapter_Pdo_Pgsql
  • Zend_Db_Adapter_Pdo_Sqlite
  • Zend_Db_Adapter_Sqlsrv

Exceptions

  • Zend_Db_Adapter_Db2_Exception
  • Zend_Db_Adapter_Exception
  • Zend_Db_Adapter_Mysqli_Exception
  • Zend_Db_Adapter_Oracle_Exception
  • Zend_Db_Adapter_Sqlsrv_Exception
  • Overview
  • Package
  • Class
  • Tree

Class Zend_Db_Adapter_Pdo_Abstract

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

Zend_Db_Adapter_Abstract
Extended by Zend_Db_Adapter_Pdo_Abstract

Direct known subclasses

Zend_Db_Adapter_Pdo_Ibm, Zend_Db_Adapter_Pdo_Mssql, Zend_Db_Adapter_Pdo_Mysql, Zend_Db_Adapter_Pdo_Oci, Zend_Db_Adapter_Pdo_Pgsql, Zend_Db_Adapter_Pdo_Sqlite
Abstract
Package: Zend\Db\Adapter
Category: Zend
Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License: New BSD License
Located at Zend/Db/Adapter/Pdo/Abstract.php
Methods summary
protected string
# _dsn( )

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

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

Returns

string
protected
# _connect( )

Creates a PDO object and connects to the database.

Creates a PDO object and connects to the database.

Throws

Zend_Db_Adapter_Exception
public boolean
# isConnected( )

Test if a connection is active

Test if a connection is active

Returns

boolean
public
# closeConnection( )

Force the connection to close.

Force the connection to close.

public PDOStatement
# prepare( string $sql )

Prepares an SQL statement.

Prepares an SQL statement.

Parameters

$sql
string
The SQL statement with placeholders.

Returns

PDOStatement
public string
# lastInsertId( string $tableName = null, string $primaryKey = null )

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

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.

On RDBMS brands that don't support sequences, $tableName and $primaryKey are ignored.

Parameters

$tableName
string
OPTIONAL Name of table.
$primaryKey
string
OPTIONAL Name of primary key column.

Returns

string
public Zend_Db_Statement_Pdo
# query( string|Zend_Db_Select $sql, array $bind = array() )

Special handling for PDO query(). All bind parameter names must begin with ':'

Special handling for PDO query(). All bind parameter names must begin with ':'

Parameters

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

Returns

Zend_Db_Statement_Pdo

Throws

Zend_Db_Adapter_Exception
To re-throw PDOException.
public integer
# exec( mixed $sql )

Executes an SQL statement and return the number of affected rows

Executes an SQL statement and return the number of affected rows

Parameters

$sql
mixed
The SQL statement with placeholders. May be a string or Zend_Db_Select.

Returns

integer
Number of rows that were modified or deleted by the SQL statement
protected string
# _quote( string $value )

Quote a raw string.

Quote a raw string.

Parameters

$value
string
Raw string

Returns

string
Quoted string
protected
# _beginTransaction( )

Begin a transaction.

Begin a transaction.

protected
# _commit( )

Commit a transaction.

Commit a transaction.

protected
# _rollBack( )

Roll-back a transaction.

Roll-back a transaction.

public
# setFetchMode( integer $mode )

Set the PDO fetch mode.

Set the PDO fetch mode.

Parameters

$mode
integer
A PDO fetch mode.

Throws

Zend_Db_Adapter_Exception
public boolean
# supportsParameters( string $type )

Check if the adapter supports real SQL parameters.

Check if the adapter supports real SQL parameters.

Parameters

$type
string
'positional' or 'named'

Returns

boolean
public string
# getServerVersion( )

Retrieve server version in PHP style

Retrieve server version in PHP style

Returns

string
Methods inherited from Zend_Db_Adapter_Abstract
__construct(), __sleep(), __wakeup(), _checkRequiredOptions(), _quoteIdentifier(), _quoteIdentifierAs(), _whereExpr(), beginTransaction(), commit(), delete(), describeTable(), fetchAll(), fetchAssoc(), fetchCol(), fetchOne(), fetchPairs(), fetchRow(), foldCase(), getConfig(), getConnection(), getFetchMode(), getProfiler(), getQuoteIdentifierSymbol(), getStatementClass(), insert(), lastSequenceId(), limit(), listTables(), nextSequenceId(), quote(), quoteColumnAs(), quoteIdentifier(), quoteInto(), quoteTableAs(), rollBack(), select(), setProfiler(), setStatementClass(), update()
Properties summary
protected string $_defaultStmtClass 'Zend_Db_Statement_Pdo'
#

Default class name for a DB statement.

Default class name for a DB statement.

Properties inherited from Zend_Db_Adapter_Abstract
$_allowSerialization, $_autoQuoteIdentifiers, $_autoReconnectOnUnserialize, $_caseFolding, $_config, $_connection, $_defaultProfilerClass, $_fetchMode, $_numericDataTypes, $_profiler
Pry Framework API documentation generated by ApiGen 2.6.1