Db/Statement.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
- Implements
- Children
- \Zend_Db_Statement_Oracle
- \Zend_Db_Statement_Mysqli
- \Zend_Db_Statement_Pdo
- \Zend_Db_Statement_Sqlsrv
- \Zend_Db_Statement_Db2
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

array $_bindParam = array()array()Details- Type
- array

integer $_fetchMode = \Zend_Db::FETCH_ASSOC\Zend_Db::FETCH_ASSOCDetails- Type
- integer

array $_sqlParam = array()array()Details- Type
- array

array $_sqlSplit = array()array()Details- Type
- array
Methods

__construct(\Zend_Db_Adapter_Abstract $adapter, mixed $sql) : voidConstructor for a statement.
| Name | Type | Description |
|---|---|---|
| $adapter | \Zend_Db_Adapter_Abstract | |
| $sql | mixed | Either a string or Zend_Db_Select. |

_fetchBound(array $row) : boolHelper function to map retrieved row to bound column variables
| Name | Type | Description |
|---|---|---|
| $row | array |
| Type | Description |
|---|---|
| bool | True |

_prepare( $sql) : voidInternal method called by abstract statment constructor to setup the driver level statement
| Name | Type | Description |
|---|---|---|
| $sql |

_stripQuoted(string $sql) : stringRemove parts of a SQL string that contain quoted strings of values or identifiers.
| Name | Type | Description |
|---|---|---|
| $sql | string |
| Type | Description |
|---|---|
| string |

bindColumn(string $column, mixed $param, mixed $type = null) : boolBind a column of the statement result set to a PHP variable.
| Name | Type | Description |
|---|---|---|
| $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 |
| Type | Description |
|---|---|
| bool |

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 |

bindValue(mixed $parameter, mixed $value, mixed $type = null) : boolBinds a value to a parameter.
| Name | Type | Description |
|---|---|---|
| $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. |
| Type | Description |
|---|---|
| bool |

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

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. |

fetchColumn(int $col = 0) : stringReturns a single column from the next row of a result set.
| Name | Type | Description |
|---|---|---|
| $col | int | OPTIONAL Position of the column to fetch. |
| Type | Description |
|---|---|
| string | One value from the next row of result set, or false. |

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

getAdapter() : \Zend_Db_Adapter_AbstractGets the Zend_Db_Adapter_Abstract for this particular Zend_Db_Statement object.
| Type | Description |
|---|---|
| \Zend_Db_Adapter_Abstract |

getAttribute(string $key) : mixedRetrieve a statement attribute.
| Name | Type | Description |
|---|---|---|
| $key | string | Attribute name. |
| Type | Description |
|---|---|
| mixed | Attribute value. |

getDriverStatement() : \unknown_typeGets the resource or object setup by the _parse
| Type | Description |
|---|---|
| \unknown_type |

setAttribute(string $key, mixed $val) : boolSet a statement attribute.
| Name | Type | Description |
|---|---|---|
| $key | string | Attribute name. |
| $val | mixed | Attribute value. |
| Type | Description |
|---|---|
| bool |

setFetchMode(int $mode) : boolSet the default fetch mode for this statement.
| Name | Type | Description |
|---|---|---|
| $mode | int | The fetch mode. |
| Type | Description |
|---|---|
| bool |
| Exception | Description |
|---|---|
| \Zend_Db_Statement_Exception |