Zend Framework
1.12
|
Public Member Functions | |
__construct ($adapter, $sql) | |
Constructor for a statement. | |
bindColumn ($column, &$param, $type=null) | |
Bind a column of the statement result set to a PHP variable. | |
bindParam ($parameter, &$variable, $type=null, $length=null, $options=null) | |
Binds a parameter to the specified variable name. | |
bindValue ($parameter, $value, $type=null) | |
Binds a value to a parameter. | |
execute (array $params=null) | |
Executes a prepared statement. | |
fetchAll ($style=null, $col=null) | |
Returns an array containing all of the result set rows. | |
fetchColumn ($col=0) | |
Returns a single column from the next row of a result set. | |
fetchObject ($class= 'stdClass', array $config=array()) | |
Fetches the next row and returns it as an object. | |
getAttribute ($key) | |
Retrieve a statement attribute. | |
setAttribute ($key, $val) | |
Set a statement attribute. | |
setFetchMode ($mode) | |
Set the default fetch mode for this statement. | |
_fetchBound ($row) | |
Helper function to map retrieved row to bound column variables. | |
getAdapter () | |
Gets the Zend_Db_Adapter_Abstract for this particular Zend_Db_Statement object. | |
getDriverStatement () | |
Gets the resource or object setup by the _parse. | |
![]() | |
closeCursor () | |
Closes the cursor, allowing the statement to be executed again. | |
columnCount () | |
Returns the number of columns in the result set. | |
errorCode () | |
Retrieves the error code, if any, associated with the last operation on the statement handle. | |
errorInfo () | |
Retrieves an array of error information, if any, associated with the last operation on the statement handle. | |
fetch ($style=null, $cursor=null, $offset=null) | |
Fetches a row from the result set. | |
nextRowset () | |
Retrieves the next rowset (result set) for a SQL statement that has multiple result sets. | |
rowCount () | |
Returns the number of rows affected by the execution of the last INSERT, DELETE, or UPDATE statement executed by this statement object. | |
Protected Member Functions | |
_prepare ($sql) | |
Internal method called by abstract statment constructor to setup the driver level statement. | |
_parseParameters ($sql) | |
_stripQuoted ($sql) | |
Remove parts of a SQL string that contain quoted strings of values or identifiers. | |
Protected Attributes | |
$_stmt = null | |
$_adapter = null | |
$_fetchMode = Zend_Db::FETCH_ASSOC | |
$_attribute = array() | |
$_bindColumn = array() | |
$_bindParam = array() | |
$_sqlSplit = array() | |
$_sqlParam = array() | |
$_queryId = null | |
__construct | ( | $adapter, | |
$sql | |||
) |
Constructor for a statement.
Zend_Db_Adapter_Abstract | $adapter | |
mixed | $sql | Either a string or Zend_Db_Select. |
_fetchBound | ( | $row | ) |
Helper function to map retrieved row to bound column variables.
array | $row |
|
protected |
|
protected |
Internal method called by abstract statment constructor to setup the driver level statement.
|
protected |
Remove parts of a SQL string that contain quoted strings of values or identifiers.
string | $sql |
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.
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.
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.
execute | ( | array | $params = null | ) |
Executes a prepared statement.
array | $params | OPTIONAL Values to bind to parameter placeholders. |
Implements Zend_Db_Statement_Interface.
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.
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.
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.
getAdapter | ( | ) |
Gets the Zend_Db_Adapter_Abstract for this particular Zend_Db_Statement object.
getAttribute | ( | $key | ) |
Retrieve a statement attribute.
string | $key | Attribute name. |
Implements Zend_Db_Statement_Interface.
getDriverStatement | ( | ) |
Gets the resource or object setup by the _parse.
setAttribute | ( | $key, | |
$val | |||
) |
Set a statement attribute.
string | $key | Attribute name. |
mixed | $val | Attribute value. |
Implements Zend_Db_Statement_Interface.
setFetchMode | ( | $mode | ) |
Set the default fetch mode for this statement.
int | $mode | The fetch mode. |
Zend_Db_Statement_Exception |
Implements Zend_Db_Statement_Interface.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |