Extends for Oracle.

category Zend
package Zend_Db
subpackage Statement
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Db_Statement

 Methods

Constructor for a statement.

__construct(\Zend_Db_Adapter_Abstract $adapter, mixed $sql) 
Inherited

Parameters

$adapter

\Zend_Db_Adapter_Abstract

$sql

mixed

Either a string or Zend_Db_Select.

Executes a prepared statement.

_execute(array $params = null) : boolean

Parameters

$params

array

OPTIONAL Values to bind to parameter placeholders.

Exceptions

\Zend_Db_Statement_Exception

Returns

boolean

Helper function to map retrieved row to bound column variables

_fetchBound(array $row) : boolean
Inherited

Parameters

$row

array

Returns

booleanTrue

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

bindColumn(string $column, mixed $param, mixed $type = null) : boolean
Inherited
inherited_from \Zend_Db_Statement_Interface::bindColumn()

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

Binds a parameter to the specified variable name.

bindParam(mixed $parameter, mixed $variable, mixed $type = null, mixed $length = null, mixed $options = null) : boolean
Inherited
inherited_from \Zend_Db_Statement_Interface::bindParam()

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

Binds a value to a parameter.

bindValue(mixed $parameter, mixed $value, mixed $type = null) : boolean
Inherited
inherited_from \Zend_Db_Statement_Interface::bindValue()

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

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

closeCursor() : boolean

Returns

boolean

Returns the number of columns in the result set.

columnCount() : integer

Returns null if the statement has no result set metadata.

Returns

integerThe number of columns.

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

errorCode() : string

Returns

stringerror code.

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

errorInfo() : array

Returns

array

Executes a prepared statement.

execute(array $params = null) : boolean
Inherited
inherited_from \Zend_Db_Statement_Interface::execute()

Parameters

$params

array

OPTIONAL Values to bind to parameter placeholders.

Returns

boolean

Fetches a row from the result set.

fetch(integer $style = null, integer $cursor = null, integer $offset = null) : mixed

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.

Exceptions

\Zend_Db_Statement_Exception

Returns

mixedArray, object, or scalar depending on fetch mode.

Returns an array containing all of the result set rows.

fetchAll(integer $style = null, integer $col = 0) : array
inherited_from \Zend_Db_Statement::fetchAll()

Parameters

$style

integer

OPTIONAL Fetch mode.

$col

integer

OPTIONAL Column number, if fetch mode is by column.

Exceptions

\Zend_Db_Statement_Exception

Returns

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

Returns an array containing all of the result set rows.

fetchAll(integer $style = null, integer $col = null) : array
Inherited
inherited_from \Zend_Db_Statement_Interface::fetchAll()

Parameters

$style

integer

OPTIONAL Fetch mode.

$col

integer

OPTIONAL Column number, if fetch mode is by column.

Returns

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

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

fetchColumn(integer $col = 0) : string
inherited_from \Zend_Db_Statement::fetchColumn()

Parameters

$col

integer

OPTIONAL Position of the column to fetch.

Exceptions

\Zend_Db_Statement_Exception

Returns

string

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

fetchColumn(integer $col = 0) : string
Inherited
inherited_from \Zend_Db_Statement_Interface::fetchColumn()

Parameters

$col

integer

OPTIONAL Position of the column to fetch.

Returns

stringOne value from the next row of result set, or false.

Fetches the next row and returns it as an object.

fetchObject(string $class = 'stdClass', array $config = array()) : mixed
inherited_from \Zend_Db_Statement::fetchObject()

Parameters

$class

string

OPTIONAL Name of the class to create.

$config

array

OPTIONAL Constructor arguments for the class.

Exceptions

\Zend_Db_Statement_Exception

Returns

mixedOne object instance of the specified class.

Fetches the next row and returns it as an object.

fetchObject(string $class = 'stdClass', array $config = array()) : mixed
Inherited
inherited_from \Zend_Db_Statement_Interface::fetchObject()

Parameters

$class

string

OPTIONAL Name of the class to create.

$config

array

OPTIONAL Constructor arguments for the class.

Returns

mixedOne object instance of the specified class, or false.

Gets the Zend_Db_Adapter_Abstract for this particular Zend_Db_Statement object.

getAdapter() : \Zend_Db_Adapter_Abstract
Inherited

Returns

\Zend_Db_Adapter_Abstract

Retrieve a statement attribute.

getAttribute(string $key) : mixed
Inherited
inherited_from \Zend_Db_Statement_Interface::getAttribute()

Parameters

$key

string

Attribute name.

Returns

mixedAttribute value.

Gets the resource or object setup by the _parse

getDriverStatement() : \unknown_type
Inherited

Returns

\unknown_type

Return whether or not LOB are returned as string

getLobAsString() : boolean

Returns

boolean

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.

nextRowset() : boolean

Exceptions

\Zend_Db_Statement_Exception

Returns

boolean

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

rowCount() : integer

Exceptions

\Zend_Db_Statement_Exception

Returns

integerThe number of rows affected.

Set a statement attribute.

setAttribute(string $key, mixed $val) : boolean
Inherited
inherited_from \Zend_Db_Statement_Interface::setAttribute()

Parameters

$key

string

Attribute name.

$val

mixed

Attribute value.

Returns

boolean

Set the default fetch mode for this statement.

setFetchMode(integer $mode) : boolean
Inherited
inherited_from \Zend_Db_Statement_Interface::setFetchMode()

Parameters

$mode

integer

The fetch mode.

Exceptions

\Zend_Db_Statement_Exception

Returns

boolean

Activate/deactivate return of LOB as string

setLobAsString(string $lob_as_string) : \Zend_Db_Statement_Oracle

Parameters

$lob_as_string

string

Returns

\Zend_Db_Statement_Oracle

Binds a parameter to the specified variable name.

_bindParam(mixed $parameter, mixed $variable, mixed $type = null, mixed $length = null, mixed $options = null) : boolean

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.

Exceptions

\Zend_Db_Statement_Exception

Returns

boolean

_parseParameters()

_parseParameters(string $sql) : void
Inherited

Parameters

$sql

string

Prepares statement handle

_prepare(string $sql) : void
inherited_from \Zend_Db_Statement::_prepare()

Parameters

$sql

string

Exceptions

\Zend_Db_Statement_Oracle_Exception

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

_prepare($sql) : void
Inherited

Parameters

$sql

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

_stripQuoted(string $sql) : string
Inherited

Parameters

$sql

string

Returns

string

 Properties

 

$_adapter

$_adapter : \Zend_Db_Adapter_Abstract

Default

null
 

Attributes.

$_attribute : array

Default

array()
 

Column result bindings.

$_bindColumn : array

Default

array()
 

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

$_bindParam : array

Default

array()
 

The current fetch mode.

$_fetchMode : integer

Default

\Zend_Db::FETCH_ASSOC
 

Column names.

$_keys 

Default

 

Check if LOB field are returned as string instead of OCI-Lob object

$_lobAsString : boolean

Default

false
 

$_queryId

$_queryId : \Zend_Db_Profiler_Query

Default

null
 

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

$_sqlParam : array

Default

array()
 

SQL string split into an array at placeholders.

$_sqlSplit : array

Default

array()
 

The driver level statement object/resource

$_stmt : resource | object

Default

null
 

Fetched result values.

$_values 

Default