Abstract Class Zend_Db_Statement

Description

Implements interfaces:

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
 class Zend_Db_Statement_Db2 Extends for DB2 native adapter.
 class Zend_Db_Statement_Mysqli Extends for Mysqli
 class 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 ([ $params = array()])
 mixed fetch ([string $style = null], [string $cursor = null], [integer $offset = null])
 array fetchAll ([integer $style = null], [string $col = null])
 array fetchColumn ([integer $col = 0])
 mixed fetchObject ([string $class = 'stdClass'], [ $config = array()])
 mixed getAttribute (string $key)
 void nextRowset ()
 int 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)
bindColumn (line 142)

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 158)

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:
bindValue (line 323)

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 336)

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:
columnCount (line 349)

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:
errorCode (line 362)

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:
errorInfo (line 375)

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:
execute (line 389)

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 ([ $params = array()])
  • array $params: OPTIONAL

Implementation of:
Zend_Db_Statement_Interface::execute()
executes a prepared statement

Redefined in descendants as:
fetch (line 406)

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
mixed 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:
fetchAll (line 189)

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:
fetchColumn (line 211)

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

  • access: public
array fetchColumn (integer $col)
  • integer $col: OPTIONAL

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

Redefined in descendants as:
fetchObject (line 230)

Fetches the next row and returns it as an object.

  • access: public
mixed fetchObject ([string $class = 'stdClass'], [ $config = array()])
  • 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:
getAttribute (line 246)

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 294)

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:
rowCount (line 307)

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

  • return: Number of rows affected.
  • access: public
  • throws: Zend_Db_Statement_Exception
  • todo: needs implementation or better exception message
  • todo: fix docblock for params & return types
int 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:
setAttribute (line 260)

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 271)

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 124)

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)

Redefined in descendants as:

Documentation generated on Fri, 06 Apr 2007 18:31:56 -0700 by phpDocumentor 1.3.1