Db/Statement/Db2.php
- 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
- Parent(s)
- \Zend_Db_Statement
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
Methods

_bindParam(mixed $parameter, mixed $variable, mixed $type = null, mixed $length = null, mixed $options = null) : boolBinds a parameter to the specified variable name.
| Name | Type | Description |
|---|---|---|
| $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. |
| Type | Description |
|---|---|
| bool |
| Exception | Description |
|---|---|
| \Zend_Db_Statement_Db2_Exception |

_execute(array $params = null) : boolExecutes a prepared statement.
| Name | Type | Description |
|---|---|---|
| $params | array | OPTIONAL Values to bind to parameter placeholders. |
| Type | Description |
|---|---|
| bool |
| Exception | Description |
|---|---|
| \Zend_Db_Statement_Db2_Exception |

_prepare(string $sql) : voidPrepare a statement handle.
| Name | Type | Description |
|---|---|---|
| $sql | string |
| Exception | Description |
|---|---|
| \Zend_Db_Statement_Db2_Exception |

closeCursor() : boolCloses the cursor, allowing the statement to be executed again.
| Type | Description |
|---|---|
| bool |

columnCount() : intReturns the number of columns in the result set.
| Type | Description |
|---|---|
| int | The number of columns. |

errorCode() : stringRetrieves the error code, if any, associated with the last operation on the statement handle.
| Type | Description |
|---|---|
| string | error code. |

errorInfo() : arrayRetrieves an array of error information, if any, associated with the last operation on the statement handle.
| Type | Description |
|---|---|
| array |

fetch(int $style = null, int $cursor = null, int $offset = null) : mixedFetches a row from the result set.
| Name | Type | Description |
|---|---|---|
| $style | int | OPTIONAL Fetch mode for this fetch operation. |
| $cursor | int | OPTIONAL Absolute, relative, or other. |
| $offset | int | OPTIONAL Number for absolute or relative cursors. |
| Type | Description |
|---|---|
| mixed | Array, object, or scalar depending on fetch mode. |
| Exception | Description |
|---|---|
| \Zend_Db_Statement_Db2_Exception |

fetchAll(int $style = null, int $col = null) : arrayReturns an array containing all of the result set rows.
| Name | Type | Description |
|---|---|---|
| $style | int | OPTIONAL Fetch mode. |
| $col | int | OPTIONAL Column number, if fetch mode is by column. |
| Type | Description |
|---|---|
| array | Collection 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' |

fetchObject(string $class = 'stdClass', array $config = array()) : mixedFetches the next row and returns it as an object.
| Name | Type | Description |
|---|---|---|
| $class | string | OPTIONAL Name of the class to create. |
| $config | array | OPTIONAL Constructor arguments for the class. |
| Type | Description |
|---|---|
| mixed | One object instance of the specified class. |

nextRowset() : boolRetrieves 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.
| Type | Description |
|---|---|
| bool |
| Exception | Description |
|---|---|
| \Zend_Db_Statement_Db2_Exception |