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_Statement
  • Zend_Db_Statement_Db2
  • Zend_Db_Statement_Mysqli
  • Zend_Db_Statement_Oracle
  • Zend_Db_Statement_Pdo
  • Zend_Db_Statement_Pdo_Ibm
  • Zend_Db_Statement_Pdo_Oci
  • Zend_Db_Statement_Sqlsrv

Interfaces

  • Zend_Db_Statement_Interface

Exceptions

  • Zend_Db_Statement_Db2_Exception
  • Zend_Db_Statement_Exception
  • Zend_Db_Statement_Mysqli_Exception
  • Zend_Db_Statement_Oracle_Exception
  • Zend_Db_Statement_Sqlsrv_Exception
  • Overview
  • Package
  • Class
  • Tree

Interface Zend_Db_Statement_Interface

Emulates a PDOStatement for native database adapters.

Direct known implementers

Zend_Db_Statement

Indirect known implementers

Zend_Db_Statement_Db2, Zend_Db_Statement_Mysqli, Zend_Db_Statement_Oracle, Zend_Db_Statement_Pdo, Zend_Db_Statement_Pdo_Ibm, Zend_Db_Statement_Pdo_Oci, Zend_Db_Statement_Sqlsrv
Package: Zend\Db\Statement
Category: Zend
Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License: New BSD License
Located at Zend/Db/Statement/Interface.php
Methods summary
public boolean
# bindColumn( string $column, mixed & $param, mixed $type = null )

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

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

Parameters

$column
string
Name the column in the result set, either by position or by name.
$param
mixed
Reference to the PHP variable containing the value.
$type
mixed
OPTIONAL

Returns

boolean

Throws

Zend_Db_Statement_Exception
public boolean
# bindParam( mixed $parameter, mixed & $variable, mixed $type = null, mixed $length = null, mixed $options = null )

Binds a parameter to the specified variable name.

Binds a parameter to the specified variable name.

Parameters

$parameter
mixed
Name the parameter, either integer or string.
$variable
mixed
Reference to PHP variable containing the value.
$type
mixed
OPTIONAL Datatype of SQL parameter.
$length
mixed
OPTIONAL Length of SQL parameter.
$options
mixed
OPTIONAL Other options.

Returns

boolean

Throws

Zend_Db_Statement_Exception
public boolean
# bindValue( mixed $parameter, mixed $value, mixed $type = null )

Binds a value to a parameter.

Binds a value to a parameter.

Parameters

$parameter
mixed
Name the parameter, either integer or string.
$value
mixed
Scalar value to bind to the parameter.
$type
mixed
OPTIONAL Datatype of the parameter.

Returns

boolean

Throws

Zend_Db_Statement_Exception
public boolean
# closeCursor( )

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

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

Returns

boolean

Throws

Zend_Db_Statement_Exception
public integer
# columnCount( )

Returns the number of columns in the result set. Returns null if the statement has no result set metadata.

Returns the number of columns in the result set. Returns null if the statement has no result set metadata.

Returns

integer
The number of columns.

Throws

Zend_Db_Statement_Exception
public string
# errorCode( )

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

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

Returns

string
error code.

Throws

Zend_Db_Statement_Exception
public array
# errorInfo( )

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

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

Returns

array

Throws

Zend_Db_Statement_Exception
public boolean
# execute( array $params = array() )

Executes a prepared statement.

Executes a prepared statement.

Parameters

$params
array
OPTIONAL Values to bind to parameter placeholders.

Returns

boolean

Throws

Zend_Db_Statement_Exception
public mixed
# fetch( integer $style = null, integer $cursor = null, integer $offset = null )

Fetches a row from the result set.

Fetches a row from the result set.

Parameters

$style
integer
OPTIONAL Fetch mode for this fetch operation.
$cursor
integer
OPTIONAL Absolute, relative, or other.
$offset
integer
OPTIONAL Number for absolute or relative cursors.

Returns

mixed
Array, object, or scalar depending on fetch mode.

Throws

Zend_Db_Statement_Exception
public array
# fetchAll( integer $style = null, integer $col = null )

Returns an array containing all of the result set rows.

Returns an array containing all of the result set rows.

Parameters

$style
integer
OPTIONAL Fetch mode.
$col
integer
OPTIONAL Column number, if fetch mode is by column.

Returns

array
Collection of rows, each in a format by the fetch mode.

Throws

Zend_Db_Statement_Exception
public string
# fetchColumn( integer $col = 0 )

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

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

Parameters

$col
integer
OPTIONAL Position of the column to fetch.

Returns

string

Throws

Zend_Db_Statement_Exception
public mixed
# fetchObject( string $class = 'stdClass', array $config = array() )

Fetches the next row and returns it as an object.

Fetches the next row and returns it as an object.

Parameters

$class
string
OPTIONAL Name of the class to create.
$config
array
OPTIONAL Constructor arguments for the class.

Returns

mixed
One object instance of the specified class.

Throws

Zend_Db_Statement_Exception
public mixed
# getAttribute( string $key )

Retrieve a statement attribute.

Retrieve a statement attribute.

Parameters

$key
string
Attribute name.

Returns

mixed
Attribute value.

Throws

Zend_Db_Statement_Exception
public boolean
# nextRowset( )

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.

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.

Returns

boolean

Throws

Zend_Db_Statement_Exception
public integer
# rowCount( )

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

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

Returns

integer
The number of rows affected.

Throws

Zend_Db_Statement_Exception
public boolean
# setAttribute( string $key, mixed $val )

Set a statement attribute.

Set a statement attribute.

Parameters

$key
string
Attribute name.
$val
mixed
Attribute value.

Returns

boolean

Throws

Zend_Db_Statement_Exception
public boolean
# setFetchMode( integer $mode )

Set the default fetch mode for this statement.

Set the default fetch mode for this statement.

Parameters

$mode
integer
The fetch mode.

Returns

boolean

Throws

Zend_Db_Statement_Exception
Pry Framework API documentation generated by ApiGen 2.6.1