Abstract Class Zend_Db_Statement

Description

Implements interfaces:

Abstract class to emulate a PDOStatement for native database adapters.

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

Located in /Db/Statement.php (line 42)


	
			
Direct descendents
Class Description
 class Zend_Db_Statement_Pdo Proxy class to wrap a PDOStatement object.
 class Zend_Db_Statement_Db2 Extends for DB2 native adapter.
 class Zend_Db_Statement_Mysqli Extends for Mysqli
 class Zend_Db_Statement_Sqlsrv Extends for Microsoft SQL Server Driver for PHP
 class Zend_Db_Statement_Oracle Extends for Oracle.
Variable Summary
Method Summary
 Zend_Db_Statement __construct (Zend_Db_Adapter_Abstract $adapter, mixed $sql)
 bool bindColumn (string $column,  &$param, [mixed $type = null], mixed $param)
 bool bindParam (mixed $parameter,  &$variable, [mixed $type = null], [mixed $length = null], [mixed $options = null], mixed $variable)
 bool bindValue (mixed $parameter, mixed $value, [mixed $type = null])
 bool execute ([ $params = null])
 array fetchAll ([int $style = null], [int $col = null])
 string fetchColumn ([int $col = 0])
 mixed fetchObject ([string $class = 'stdClass'], [ $config = array()])
 mixed getAttribute (string $key)
 unknown_type getDriverStatement ()
 bool setAttribute (string $key, mixed $val)
 bool setFetchMode (int $mode)
 bool _fetchBound (array $row)
 void _parseParameters (string $sql)
 void _prepare ( $sql)
 string _stripQuoted (string $sql)
Variables
Zend_Db_Adapter_Abstract $_adapter = null (line 53)
  • access: protected
array $_attribute = array() (line 67)

Attributes.

  • access: protected
array $_bindColumn = array() (line 74)

Column result bindings.

  • access: protected
array $_bindParam = array() (line 81)

Query parameter bindings; covers bindParam() and bindValue().

  • access: protected
integer $_fetchMode = Zend_Db::FETCH_ASSOC (line 60)

The current fetch mode.

  • access: protected

Redefined in descendants as:
Zend_Db_Profiler_Query $_queryId = null (line 100)
  • access: protected
array $_sqlParam = array() (line 95)

Parameter placeholders in the SQL string by position in the split array.

  • access: protected
array $_sqlSplit = array() (line 88)

SQL string split into an array at placeholders.

  • access: protected
resource|object The $_stmt = null (line 48)
  • var: driver level statement object/resource
  • access: protected
Methods
Constructor __construct (line 108)

Constructor for a statement.

  • access: public
Zend_Db_Statement __construct (Zend_Db_Adapter_Abstract $adapter, mixed $sql)
bindColumn (line 222)

Bind a column of the statement result set to a PHP variable.

  • access: public
bool bindColumn (string $column,  &$param, [mixed $type = null], mixed $param)
  • string $column: Name the column in the result set, either by position or by name.
  • mixed $param: Reference to the PHP variable containing the value.
  • mixed $type: OPTIONAL
  • &$param

Implementation of:
Zend_Db_Statement_Interface::bindColumn()
Bind a column of the statement result set to a PHP variable.

Redefined in descendants as:
bindParam (line 238)

Binds a parameter to the specified variable name.

  • access: public
bool bindParam (mixed $parameter,  &$variable, [mixed $type = null], [mixed $length = null], [mixed $options = null], mixed $variable)
  • mixed $parameter: Name the parameter, either integer or string.
  • mixed $variable: Reference to PHP variable containing the value.
  • mixed $type: OPTIONAL Datatype of SQL parameter.
  • mixed $length: OPTIONAL Length of SQL parameter.
  • mixed $options: OPTIONAL Other options.
  • &$variable

Implementation of:
Zend_Db_Statement_Interface::bindParam()
Binds a parameter to the specified variable name.
bindValue (line 283)

Binds a value to a parameter.

  • access: public
bool bindValue (mixed $parameter, mixed $value, [mixed $type = null])
  • mixed $parameter: Name the parameter, either integer or string.
  • mixed $value: Scalar value to bind to the parameter.
  • mixed $type: OPTIONAL Datatype of the parameter.

Implementation of:
Zend_Db_Statement_Interface::bindValue()
Binds a value to a parameter.

Redefined in descendants as:
execute (line 294)

Executes a prepared statement.

  • access: public
bool execute ([ $params = null])
  • array $params: OPTIONAL Values to bind to parameter placeholders.

Implementation of:
Zend_Db_Statement_Interface::execute()
Executes a prepared statement.
fetchAll (line 334)

Returns an array containing all of the result set rows.

  • return: Collection of rows, each in a format by the fetch mode.
  • access: public
array fetchAll ([int $style = null], [int $col = null])
  • int $style: OPTIONAL Fetch mode.
  • int $col: OPTIONAL Column number, if fetch mode is by column.

Implementation of:
Zend_Db_Statement_Interface::fetchAll()
Returns an array containing all of the result set rows.

Redefined in descendants as:
fetchColumn (line 358)

Returns a single column from the next row of a result set.

  • return: One value from the next row of result set, or false.
  • access: public
string fetchColumn ([int $col = 0])
  • int $col: OPTIONAL Position of the column to fetch.

Implementation of:
Zend_Db_Statement_Interface::fetchColumn()
Returns a single column from the next row of a result set.

Redefined in descendants as:
fetchObject (line 376)

Fetches the next row and returns it as an object.

  • return: One object instance of the specified class, or false.
  • access: public
mixed fetchObject ([string $class = 'stdClass'], [ $config = array()])
  • string $class: OPTIONAL Name of the class to create.
  • array $config: OPTIONAL Constructor arguments for the class.

Implementation of:
Zend_Db_Statement_Interface::fetchObject()
Fetches the next row and returns it as an object.

Redefined in descendants as:
getAdapter (line 471)

Gets the Zend_Db_Adapter_Abstract for this particular Zend_Db_Statement object.

  • access: public
Zend_Db_Adapter_Abstract getAdapter ()
getAttribute (line 395)

Retrieve a statement attribute.

  • return: Attribute value.
  • access: public
mixed getAttribute (string $key)
  • string $key: Attribute name.

Implementation of:
Zend_Db_Statement_Interface::getAttribute()
Retrieve a statement attribute.

Redefined in descendants as:
getDriverStatement (line 481)

Gets the resource or object setup by the

_parse

  • access: public
unknown_type getDriverStatement ()
setAttribute (line 409)

Set a statement attribute.

  • access: public
bool setAttribute (string $key, mixed $val)
  • string $key: Attribute name.
  • mixed $val: Attribute value.

Implementation of:
Zend_Db_Statement_Interface::setAttribute()
Set a statement attribute.

Redefined in descendants as:
setFetchMode (line 421)

Set the default fetch mode for this statement.

  • throws: Zend_Db_Statement_Exception
  • access: public
bool setFetchMode (int $mode)
  • int $mode: The fetch mode.

Implementation of:
Zend_Db_Statement_Interface::setFetchMode()
Set the default fetch mode for this statement.

Redefined in descendants as:
_fetchBound (line 449)

Helper function to map retrieved row to bound column variables

  • return: True
  • access: public
bool _fetchBound (array $row)
  • array $row
_parseParameters (line 135)
  • access: protected
void _parseParameters (string $sql)
  • string $sql
_prepare (line 126)

Internal method called by abstract statment constructor to setup the driver level statement

  • access: protected
void _prepare ( $sql)
  • $sql

Redefined in descendants as:
_stripQuoted (line 177)

Remove parts of a SQL string that contain quoted strings of values or identifiers.

  • access: protected
string _stripQuoted (string $sql)
  • string $sql

Documentation generated on Mon, 21 Jun 2010 15:46:37 -0400 by phpDocumentor 1.4.3