## Zend_Db_Statement

Description

Implements interfaces:

- Zend_Db_Statement_Interface

Abstract class to emulate a PDOStatement for native database adapters.

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

Located in /Zend/Db/Statement.php (line 37)

Direct descendents

Class | Description
--- | ---
Zend_Db_Statement_Db2 | Extends for DB2 native adapter.
Zend_Db_Statement_Mysqli | Extends for Mysqli
Zend_Db_Statement_Oracle | Extends for Oracle.

Variable Summary
array $_attribute
array $_bindColumn
array $_bindParam
integer $_fetchMode
array $_sqlParam
array $_sqlSplit
Method Summary
void __construct (Zend_Db_Adapter_Abstract $connection, string|Zend_Db_Select $sql)
void bindColumn (string $column, &$param, [string $type = null], string $param)
void bindParam (mixed $parameter, &$variable, [string $type = null], [integer $length = null], [array $options = null], string $variable)
void bindValue (string $parameter, string $value, [string $type = null])
void closeCursor ()
void columnCount ()
void errorCode ()
void errorInfo ()
void execute ([array $params = null])
void fetch ([string $style = null], [string $cursor = null], [integer $offset = null])
array fetchAll ([integer $style = null], [string $col = null])
array fetchColumn ([string $col = 0])
stdClass fetchObject ([string $class = 'stdClass'], [array $config = null])
mixed getAttribute (string $key)
void nextRowset ()
void rowCount ()
void setAttribute (string $key, mixed $val)
void setFetchMode (integer $mode)
string _joinSql ()
void _prepSql (string|Zend_Db_Select $sql)
Variables
array $_attribute = array() (line 52)

Attributes.

- access: protected

array $_bindColumn = array() (line 59)

Column result bindings.

- access: protected

array $_bindParam = array() (line 66)

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

- access: protected

integer $_fetchMode = Zend_Db::FETCH_ASSOC (line 45)

The current fetch mode.

- access: protected

array $_sqlParam = array() (line 80)

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

- access: protected

array $_sqlSplit = array() (line 73)

SQL string split into an array at placeholders.

- access: protected

Methods
Constructor __construct (line 89)

Constructor.

- access: public

void __construct (Zend_Db_Adapter_Abstract $connection, string|Zend_Db_Select $sql)

- Zend_Db_Adapter_Abstract $connection
- string|Zend_Db_Select $sql

bindColumn (line 146)

Binds a PHP variable to an output column in a result set.

- access: public

void bindColumn (string $column, &$param, [string $type = null], string $param)

- string $column
- string $param
- string $type: OPTIONAL
- &$param

Implementation of:

Zend_Db_Statement_Interface::bindColumn()
  binds a PHP variable to an output column in a result set

bindParam (line 162)

Binds a PHP variable to a parameter in the prepared statement.

- access: public
- throws: Zend_Db_Statement_Exception

void bindParam (mixed $parameter, &$variable, [string $type = null], [integer $length = null], [array $options = null], string $variable)

- mixed $parameter
- string $variable
- string $type: OPTIONAL
- integer $length: OPTIONAL
- array $options: OPTIONAL
- &$variable

Implementation of:

Zend_Db_Statement_Interface::bindParam()
  binds a PHP variable to a parameter in the prepared statement

Redefined in descendants as:

- Zend_Db_Statement_Db2::bindParam()
- Zend_Db_Statement_Oracle::bindParam() : Binds a PHP variable to a parameter in the prepared statement.

bindValue (line 327)

Binds a value to a parameter in the prepared statement.

- access: public
- todo: needs implementation or better exception message
- todo: fix docblock for params & return types

void bindValue (string $parameter, string $value, [string $type = null])

- string $parameter
- string $value
- string $type: OPTIONAL

Implementation of:

Zend_Db_Statement_Interface::bindValue()
  binds a value to a parameter in the prepared statement

closeCursor (line 340)

Closes the cursor, allowing the statement to be executed again.

- access: public
- throws: Zend_Db_Statement_Exception
- todo: needs implementation or better exception message
- todo: fix docblock for params & return types

void closeCursor ()

Implementation of:

Zend_Db_Statement_Interface::closeCursor()
  closes the cursor, allowing the statement to be executed again

Redefined in descendants as:

- Zend_Db_Statement_Db2::closeCursor() : Closes the cursor, allowing the statement to be executed again.
- Zend_Db_Statement_Mysqli::closeCursor() : Closes the cursor, allowing the statement to be executed again.
- Zend_Db_Statement_Oracle::closeCursor() : closes the cursor, allowing the statement to be executed again

columnCount (line 353)

Returns the number of columns in the result set.

- access: public
- throws: Zend_Db_Statement_Exception
- todo: needs implementation or better exception message
- todo: fix docblock for params & return types

void columnCount ()

Implementation of:

Zend_Db_Statement_Interface::columnCount()
  returns the number of columns in the result set

Redefined in descendants as:

- Zend_Db_Statement_Db2::columnCount() : Returns the number of columns in the result set.
- Zend_Db_Statement_Mysqli::columnCount() : Returns the number of columns in the result set.
- Zend_Db_Statement_Oracle::columnCount() : Returns the number of columns in the result set.

errorCode (line 366)

Retrieves an error code, if any, from the statement.

- access: public
- throws: Zend_Db_Statement_Exception
- todo: needs implementation or better exception message
- todo: fix docblock for params & return types

void errorCode ()

Implementation of:

Zend_Db_Statement_Interface::errorCode()
  retrieves an error code, if any, from the statement

Redefined in descendants as:

- Zend_Db_Statement_Db2::errorCode() : Retrieves a sql state, if any, from the statement.
- Zend_Db_Statement_Mysqli::errorCode() : Retrieves an error code, if any, from the statement.
- Zend_Db_Statement_Oracle::errorCode() : Retrieves an error code, if any, from the statement.

errorInfo (line 379)

Retrieves an array of error information, if any, from the statement.

- access: public
- throws: Zend_Db_Statement_Exception
- todo: needs implementation or better exception message
- todo: fix docblock for params & return types

void errorInfo ()

Implementation of:

Zend_Db_Statement_Interface::errorInfo()
  retrieves an array of error information, if any, from the statement

Redefined in descendants as:

- Zend_Db_Statement_Db2::errorInfo() : Retrieves an error msg, if any, from the statement.
- Zend_Db_Statement_Mysqli::errorInfo() : Retrieves an array of error information, if any, from the statement.
- Zend_Db_Statement_Oracle::errorInfo() : Retrieves an array of error information, if any, from the statement.

execute (line 393)

Executes a prepared statement.

- access: public
- throws: Zend_Db_Statement_Exception
- todo: needs implementation or better exception message
- todo: fix docblock for params & return types

void execute ([array $params = null])

- array $params: OPTIONAL

Implementation of:

Zend_Db_Statement_Interface::execute()
  executes a prepared statement

Redefined in descendants as:

- Zend_Db_Statement_Db2::execute() : Executes a prepared statement.
- Zend_Db_Statement_Mysqli::execute() : Executes a prepared statement.
- Zend_Db_Statement_Oracle::execute() : Executes a prepared statement.

fetch (line 409)

Fetches a row from a result set.

- access: public
- throws: Zend_Db_Statement_Exception
- todo: needs implementation or better exception message
- todo: fix docblock for params & return types

void fetch ([string $style = null], [string $cursor = null], [integer $offset = null])

- string $style: OPTIONAL
- string $cursor: OPTIONAL
- integer $offset: OPTIONAL

Implementation of:

Zend_Db_Statement_Interface::fetch()
  fetches a row from a result set

Redefined in descendants as:

- Zend_Db_Statement_Db2::fetch() : Fetches a row from a result set.
- Zend_Db_Statement_Mysqli::fetch() : Fetches a row from the result set.
- Zend_Db_Statement_Oracle::fetch() : Fetches a row from the result set.

fetchAll (line 194)

Fetches an array containing all of the rows from a result set.

- access: public

array fetchAll ([integer $style = null], [string $col = null])

- integer $style: OPTIONAL
- string $col: OPTIONAL

Implementation of:

Zend_Db_Statement_Interface::fetchAll()
  fetches an array containing all of the rows from a result set

Redefined in descendants as:

- Zend_Db_Statement_Db2::fetchAll() : Fetches an array containing all of the rows from a result set.
- Zend_Db_Statement_Oracle::fetchAll() : Fetches an array containing all of the rows from a result set

fetchColumn (line 216)

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

- access: public

array fetchColumn (string $col)

- string $col: OPTIONAL

Implementation of:

Zend_Db_Statement_Interface::fetchColumn()
  returns the data from a single column in a result set

Redefined in descendants as:

- Zend_Db_Statement_Oracle::fetchColumn() : Returns the data from a single column in a result set.

fetchObject (line 235)

Fetches the next row and returns it as an object.

- access: public

stdClass fetchObject ([string $class = 'stdClass'], [array $config = null])

- string $class: OPTIONAL
- array $config: OPTIONAL

Implementation of:

Zend_Db_Statement_Interface::fetchObject()
  fetches the next row and returns it as an object

Redefined in descendants as:

- Zend_Db_Statement_Db2::fetchObject()
- Zend_Db_Statement_Oracle::fetchObject() : Fetches the next row and returns it as an object.

getAttribute (line 251)

Retrieves a Zend_Db_Statement attribute.

- access: public

mixed getAttribute (string $key)

- string $key

Implementation of:

Zend_Db_Statement_Interface::getAttribute()
  retrieves a Zend_Db_Statement attribute

nextRowset (line 299)

Retrieves the next rowset (result set).

- access: public
- throws: Zend_Db_Statement_Exception
- todo: needs implementation or better exception message
- todo: fix docblock for params & return types

void nextRowset ()

Implementation of:

Zend_Db_Statement_Interface::nextRowset()
  retrieves the next rowset (result set)

Redefined in descendants as:

- Zend_Db_Statement_Db2::nextRowset() : retrieves the next rowset (result set)

rowCount (line 311)

returns the number of rows that were affected by the execution of an SQL statement

- access: public
- throws: Zend_Db_Statement_Exception
- todo: needs implementation or better exception message
- todo: fix docblock for params & return types

void rowCount ()

Implementation of:

Zend_Db_Statement_Interface::rowCount()
  returns the number of rows that were affected by the execution of an SQL statement

Redefined in descendants as:

- Zend_Db_Statement_Db2::rowCount()
- Zend_Db_Statement_Mysqli::rowCount() : Returns the number of rows that were affected by the execution of an SQL statement.
- Zend_Db_Statement_Oracle::rowCount() : Returns the number of rows that were affected by the execution of an SQL statement.

setAttribute (line 265)

Sets a Zend_Db_Statement attribute.

- access: public

void setAttribute (string $key, mixed $val)

- string $key
- mixed $val

Implementation of:

Zend_Db_Statement_Interface::setAttribute()
  sets a Zend_Db_Statement attribute

setFetchMode (line 276)

Sets the fetch mode for a Zend_Db_Statement.

- access: public

void setFetchMode (integer $mode)

- integer $mode

Implementation of:

Zend_Db_Statement_Interface::setFetchMode()
  sets the fetch mode for a Zend_Db_Statement

_joinSql (line 128)

Joins SQL text and bound params into a string.

- access: protected

string _joinSql ()
_prepSql (line 101)

Splits SQL into text and params, sets up $this->_bindParam for replacements.

- access: protected

void _prepSql (string|Zend_Db_Select $sql)

- string|Zend_Db_Select $sql

Redefined in descendants as:

- Zend_Db_Statement_Db2::_prepSql() : Prepare a statement handle.
- Zend_Db_Statement_Oracle::_prepSql() : Prepares statement handle

Documentation generated on Wed, 21 Feb 2007 12:00:18 -0800 by phpDocumentor 1.3.1