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

Class Zend_Db_Statement

Abstract class to emulate a PDOStatement for native database adapters.

Zend_Db_Statement implements Zend_Db_Statement_Interface

Direct known subclasses

Zend_Db_Statement_Db2, Zend_Db_Statement_Mysqli, Zend_Db_Statement_Oracle, Zend_Db_Statement_Pdo, Zend_Db_Statement_Sqlsrv

Indirect known subclasses

Zend_Db_Statement_Pdo_Ibm, Zend_Db_Statement_Pdo_Oci
Abstract
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.php
Methods summary
public
# __construct( Zend_Db_Adapter_Abstract $adapter, mixed $sql )

Constructor for a statement.

Constructor for a statement.

Parameters

$adapter
Zend_Db_Adapter_Abstract
$sql
mixed
Either a string or Zend_Db_Select.
protected
# _prepare( $sql )

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

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

protected
# _parseParameters( string $sql )

Parameters

$sql
string
protected string
# _stripQuoted( string $sql )

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

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

Parameters

$sql
string

Returns

string
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

Implementation of

Zend_Db_Statement_Interface::bindColumn
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

Implementation of

Zend_Db_Statement_Interface::bindParam
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

Implementation of

Zend_Db_Statement_Interface::bindValue
public boolean
# execute( array $params = null )

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

Implementation of

Zend_Db_Statement_Interface::execute
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

Implementation of

Zend_Db_Statement_Interface::fetchAll
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
One value from the next row of result set, or false.

Throws

Zend_Db_Statement_Exception

Implementation of

Zend_Db_Statement_Interface::fetchColumn
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, or false.

Throws

Zend_Db_Statement_Exception

Implementation of

Zend_Db_Statement_Interface::fetchObject
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

Implementation of

Zend_Db_Statement_Interface::getAttribute
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

Implementation of

Zend_Db_Statement_Interface::setAttribute
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

Implementation of

Zend_Db_Statement_Interface::setFetchMode
public boolean
# _fetchBound( array $row )

Helper function to map retrieved row to bound column variables

Helper function to map retrieved row to bound column variables

Parameters

$row
array

Returns

boolean
True
public Zend_Db_Adapter_Abstract
# getAdapter( )

Gets the Zend_Db_Adapter_Abstract for this particular Zend_Db_Statement object.

Gets the Zend_Db_Adapter_Abstract for this particular Zend_Db_Statement object.

Returns

Zend_Db_Adapter_Abstract
public unknown_type
# getDriverStatement( )

Gets the resource or object setup by the _parse

Gets the resource or object setup by the _parse

Returns

unknown_type
Methods inherited from Zend_Db_Statement_Interface
closeCursor(), columnCount(), errorCode(), errorInfo(), fetch(), nextRowset(), rowCount()
Properties summary
protected resource|object $_stmt null
#

The driver level statement object/resource

The driver level statement object/resource

protected Zend_Db_Adapter_Abstract $_adapter null
#
protected integer $_fetchMode Zend_Db::FETCH_ASSOC
#

The current fetch mode.

The current fetch mode.

protected array $_attribute array()
#

Attributes.

Attributes.

protected array $_bindColumn array()
#

Column result bindings.

Column result bindings.

protected array $_bindParam array()
#

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

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

protected array $_sqlSplit array()
#

SQL string split into an array at placeholders.

SQL string split into an array at placeholders.

protected array $_sqlParam array()
#

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

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

protected Zend_Db_Profiler_Query $_queryId null
#
Pry Framework API documentation generated by ApiGen 2.6.1