Public Member Functions | |
__construct ($adapter, $sql) | |
bindColumn ($column, &$param, $type=null) | |
bindParam ($parameter, &$variable, $type=null, $length=null, $options=null) | |
bindValue ($parameter, $value, $type=null) | |
execute (array $params=null) | |
fetchAll ($style=null, $col=null) | |
fetchColumn ($col=0) | |
fetchObject ($class= 'stdClass', array $config=array()) | |
getAttribute ($key) | |
setAttribute ($key, $val) | |
setFetchMode ($mode) | |
_fetchBound ($row) | |
getAdapter () | |
getDriverStatement () | |
Protected Member Functions | |
_prepare ($sql) | |
_parseParameters ($sql) | |
_stripQuoted ($sql) | |
Protected Attributes | |
$_stmt = null | |
$_adapter = null | |
$_fetchMode = Zend_Db::FETCH_ASSOC | |
$_attribute = array() | |
$_bindColumn = array() | |
$_bindParam = array() | |
$_sqlSplit = array() | |
$_sqlParam = array() | |
$_queryId = null |
Definition at line 42 of file Statement.php.
__construct | ( | $ | adapter, |
$ | sql | ||
) |
Constructor for a statement.
Zend_Db_Adapter_Abstract | $adapter | |
mixed | $sql | Either a string or Zend_Db_Select. |
Definition at line 108 of file Statement.php.
_fetchBound | ( | $ | row ) |
Helper function to map retrieved row to bound column variables
array | $row |
Definition at line 449 of file Statement.php.
_parseParameters | ( | $ | sql ) | [protected] |
_prepare | ( | $ | sql ) | [protected] |
Internal method called by abstract statment constructor to setup the driver level statement
Reimplemented in Zend_Db_Statement_Db2, Zend_Db_Statement_Mysqli, Zend_Db_Statement_Oracle, Zend_Db_Statement_Pdo, Zend_Db_Statement_Sqlsrv, and ZendX_Db_Statement_Firebird.
Definition at line 126 of file Statement.php.
_stripQuoted | ( | $ | sql ) | [protected] |
Remove parts of a SQL string that contain quoted strings of values or identifiers.
string | $sql |
Definition at line 177 of file Statement.php.
bindColumn | ( | $ | column, |
&$ | param, | ||
$ | type = null |
||
) |
Bind a column of the statement result set to a PHP variable.
string | $column | Name the column in the result set, either by position or by name. |
mixed | $param | Reference to the PHP variable containing the value. |
mixed | $type | OPTIONAL |
Implements Zend_Db_Statement_Interface.
Reimplemented in Zend_Db_Statement_Pdo.
Definition at line 222 of file Statement.php.
bindParam | ( | $ | parameter, |
&$ | variable, | ||
$ | type = null , |
||
$ | length = null , |
||
$ | options = null |
||
) |
Binds a parameter to the specified variable name.
mixed | $parameter | Name the parameter, either integer or string. |
mixed | $variable | Reference to PHP variable containing the value. |
mixed | $type | OPTIONAL Datatype of SQL parameter. |
mixed | $length | OPTIONAL Length of SQL parameter. |
mixed | $options | OPTIONAL Other options. |
Implements Zend_Db_Statement_Interface.
Definition at line 238 of file Statement.php.
bindValue | ( | $ | parameter, |
$ | value, | ||
$ | type = null |
||
) |
Binds a value to a parameter.
mixed | $parameter | Name the parameter, either integer or string. |
mixed | $value | Scalar value to bind to the parameter. |
mixed | $type | OPTIONAL Datatype of the parameter. |
Implements Zend_Db_Statement_Interface.
Reimplemented in Zend_Db_Statement_Pdo.
Definition at line 283 of file Statement.php.
execute | ( | array $ | params = null ) |
Executes a prepared statement.
array | $params | OPTIONAL Values to bind to parameter placeholders. |
Implements Zend_Db_Statement_Interface.
Definition at line 294 of file Statement.php.
fetchAll | ( | $ | style = null , |
$ | col = null |
||
) |
Returns an array containing all of the result set rows.
int | $style | OPTIONAL Fetch mode. |
int | $col | OPTIONAL Column number, if fetch mode is by column. |
Implements Zend_Db_Statement_Interface.
Reimplemented in Zend_Db_Statement_Db2, Zend_Db_Statement_Oracle, Zend_Db_Statement_Pdo_Ibm, Zend_Db_Statement_Pdo_Oci, and Zend_Db_Statement_Pdo.
Definition at line 334 of file Statement.php.
fetchColumn | ( | $ | col = 0 ) |
Returns a single column from the next row of a result set.
int | $col | OPTIONAL Position of the column to fetch. |
Implements Zend_Db_Statement_Interface.
Reimplemented in Zend_Db_Statement_Oracle, Zend_Db_Statement_Pdo, and Zend_Db_Statement_Sqlsrv.
Definition at line 358 of file Statement.php.
fetchObject | ( | $ | class = 'stdClass' , |
array $ | config = array() |
||
) |
Fetches the next row and returns it as an object.
string | $class | OPTIONAL Name of the class to create. |
array | $config | OPTIONAL Constructor arguments for the class. |
Implements Zend_Db_Statement_Interface.
Reimplemented in Zend_Db_Statement_Db2, Zend_Db_Statement_Oracle, Zend_Db_Statement_Pdo, and Zend_Db_Statement_Sqlsrv.
Definition at line 376 of file Statement.php.
getAdapter | ( | ) |
Gets the Zend_Db_Adapter_Abstract for this particular Zend_Db_Statement object.
Definition at line 471 of file Statement.php.
getAttribute | ( | $ | key ) |
Retrieve a statement attribute.
string | $key | Attribute name. |
Implements Zend_Db_Statement_Interface.
Reimplemented in Zend_Db_Statement_Pdo.
Definition at line 395 of file Statement.php.
getDriverStatement | ( | ) |
Gets the resource or object setup by the _parse
Definition at line 481 of file Statement.php.
setAttribute | ( | $ | key, |
$ | val | ||
) |
Set a statement attribute.
string | $key | Attribute name. |
mixed | $val | Attribute value. |
Implements Zend_Db_Statement_Interface.
Reimplemented in Zend_Db_Statement_Pdo.
Definition at line 409 of file Statement.php.
setFetchMode | ( | $ | mode ) |
Set the default fetch mode for this statement.
int | $mode | The fetch mode. |
Zend_Db_Statement_Exception |
Implements Zend_Db_Statement_Interface.
Reimplemented in Zend_Db_Statement_Pdo.
Definition at line 421 of file Statement.php.