ClassInterface Zend_Db_Statement_Interface

Description

Emulates a PDOStatement for native database adapters.

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

Located in /Db/Statement/Interface.php (line 32)


	
			
Method Summary
 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 closeCursor ()
 int columnCount ()
 string errorCode ()
 array errorInfo ()
 bool execute ([ $params = array()])
 mixed fetch ([int $style = null], [int $cursor = null], [int $offset = 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)
 bool nextRowset ()
 int rowCount ()
 bool setAttribute (string $key, mixed $val)
 bool setFetchMode (int $mode)
Methods
bindColumn (line 45)

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

  • throws: Zend_Db_Statement_Exception
  • 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
bindParam (line 58)

Binds a parameter to the specified variable name.

  • throws: Zend_Db_Statement_Exception
  • 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
bindValue (line 69)

Binds a value to a parameter.

  • throws: Zend_Db_Statement_Exception
  • 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.
closeCursor (line 77)

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

  • throws: Zend_Db_Statement_Exception
  • access: public
bool closeCursor ()
columnCount (line 86)

Returns the number of columns in the result set.

Returns null if the statement has no result set metadata.

  • return: The number of columns.
  • throws: Zend_Db_Statement_Exception
  • access: public
int columnCount ()
errorCode (line 95)

Retrieves the error code, if any, associated with the last operation on the statement handle.

  • return: error code.
  • throws: Zend_Db_Statement_Exception
  • access: public
string errorCode ()
errorInfo (line 104)

Retrieves an array of error information, if any, associated with the last operation on the statement handle.

  • throws: Zend_Db_Statement_Exception
  • access: public
array errorInfo ()
execute (line 113)

Executes a prepared statement.

  • throws: Zend_Db_Statement_Exception
  • access: public
bool execute ([ $params = array()])
  • array $params: OPTIONAL Values to bind to parameter placeholders.
fetch (line 124)

Fetches a row from the result set.

  • return: Array, object, or scalar depending on fetch mode.
  • throws: Zend_Db_Statement_Exception
  • access: public
mixed fetch ([int $style = null], [int $cursor = null], [int $offset = null])
  • int $style: OPTIONAL Fetch mode for this fetch operation.
  • int $cursor: OPTIONAL Absolute, relative, or other.
  • int $offset: OPTIONAL Number for absolute or relative cursors.
fetchAll (line 134)

Returns an array containing all of the result set rows.

  • return: Collection of rows, each in a format by the fetch mode.
  • throws: Zend_Db_Statement_Exception
  • 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.
fetchColumn (line 143)

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

  • throws: Zend_Db_Statement_Exception
  • access: public
string fetchColumn ([int $col = 0])
  • int $col: OPTIONAL Position of the column to fetch.
fetchObject (line 153)

Fetches the next row and returns it as an object.

  • return: One object instance of the specified class.
  • throws: Zend_Db_Statement_Exception
  • 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.
getAttribute (line 162)

Retrieve a statement attribute.

  • return: Attribute value.
  • throws: Zend_Db_Statement_Exception
  • access: public
mixed getAttribute (string $key)
  • string $key: Attribute name.
nextRowset (line 172)

Retrieves the next rowset (result set) for a SQL statement that has multiple result sets. An example is a stored procedure that returns the results of multiple queries.

  • throws: Zend_Db_Statement_Exception
  • access: public
bool nextRowset ()
rowCount (line 182)

Returns the number of rows affected by the execution of the last INSERT, DELETE, or UPDATE statement executed by this statement object.

  • return: The number of rows affected.
  • throws: Zend_Db_Statement_Exception
  • access: public
int rowCount ()
setAttribute (line 192)

Set a statement attribute.

  • throws: Zend_Db_Statement_Exception
  • access: public
bool setAttribute (string $key, mixed $val)
  • string $key: Attribute name.
  • mixed $val: Attribute value.
setFetchMode (line 201)

Set the default fetch mode for this statement.

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

Documentation generated on Mon, 21 Jun 2010 15:29:26 -0400 by phpDocumentor 1.4.3