Db/Statement/Db2.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Db  
Subpackage
Statement  
Version
$Id$  

\Zend_Db_Statement_Db2

Package: Zend_Db\Statement
Extends for DB2 native adapter.
Parent(s)
\Zend_Db_Statement
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotected$_keys
Column names.
Details
Type
n/a
>VPropertyprotected$_values
Fetched result values.
Details
Type
n/a

Methods

methodpublic_bindParam(mixed $parameter, mixed $variable, mixed $type = null, mixed $length = null, mixed $options = null) : bool

Binds a parameter to the specified variable name.

Parameters
NameTypeDescription
$parametermixed

Name the parameter, either integer or string.

$variablemixed

Reference to PHP variable containing the value.

$typemixed

OPTIONAL Datatype of SQL parameter.

$lengthmixed

OPTIONAL Length of SQL parameter.

$optionsmixed

OPTIONAL Other options.

Returns
TypeDescription
bool
Throws
ExceptionDescription
\Zend_Db_Statement_Db2_Exception
methodpublic_execute(array $params = null) : bool

Executes a prepared statement.

Parameters
NameTypeDescription
$paramsarray

OPTIONAL Values to bind to parameter placeholders.

Returns
TypeDescription
bool
Throws
ExceptionDescription
\Zend_Db_Statement_Db2_Exception
methodpublic_prepare(string $sql) : void

Prepare a statement handle.

Parameters
NameTypeDescription
$sqlstring
Throws
ExceptionDescription
\Zend_Db_Statement_Db2_Exception
methodpubliccloseCursor() : bool

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

Returns
TypeDescription
bool
methodpubliccolumnCount() : int

Returns the number of columns in the result set.

Returns null if the statement has no result set metadata.
Returns
TypeDescription
intThe number of columns.
methodpublicerrorCode() : string

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

Returns
TypeDescription
stringerror code.
methodpublicerrorInfo() : array

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

Returns
TypeDescription
array
methodpublicfetch(int $style = null, int $cursor = null, int $offset = null) : mixed

Fetches a row from the result set.

Parameters
NameTypeDescription
$styleint

OPTIONAL Fetch mode for this fetch operation.

$cursorint

OPTIONAL Absolute, relative, or other.

$offsetint

OPTIONAL Number for absolute or relative cursors.

Returns
TypeDescription
mixedArray, object, or scalar depending on fetch mode.
Throws
ExceptionDescription
\Zend_Db_Statement_Db2_Exception
methodpublicfetchAll(int $style = null, int $col = null) : array

Returns an array containing all of the result set rows.

Parameters
NameTypeDescription
$styleint

OPTIONAL Fetch mode.

$colint

OPTIONAL Column number, if fetch mode is by column.

Returns
TypeDescription
arrayCollection of rows, each in a format by the fetch mode. Behaves like parent, but if limit() is used, the final result removes the extra column 'zend_db_rownum'
methodpublicfetchObject(string $class = 'stdClass', array $config = array()) : mixed

Fetches the next row and returns it as an object.

Parameters
NameTypeDescription
$classstring

OPTIONAL Name of the class to create.

$configarray

OPTIONAL Constructor arguments for the class.

Returns
TypeDescription
mixedOne object instance of the specified class.
methodpublicnextRowset() : bool

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
TypeDescription
bool
Throws
ExceptionDescription
\Zend_Db_Statement_Db2_Exception
methodpublicrowCount() : int

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

Returns
TypeDescription
intThe number of rows affected.
Documentation was generated by phpDocumentor 2.2.0 .