Public Member Functions |
| bindColumn ($column, &$param, $type=null) |
| bindValue ($parameter, $value, $type=null) |
| closeCursor () |
| columnCount () |
| errorCode () |
| errorInfo () |
| _execute (array $params=null) |
| fetch ($style=null, $cursor=null, $offset=null) |
| getIterator () |
| fetchAll ($style=null, $col=null) |
| fetchColumn ($col=0) |
| fetchObject ($class= 'stdClass', array $config=array()) |
| getAttribute ($key) |
| getColumnMeta ($column) |
| nextRowset () |
| rowCount () |
| setAttribute ($key, $val) |
| setFetchMode ($mode) |
Protected Member Functions |
| _prepare ($sql) |
| _bindParam ($parameter, &$variable, $type=null, $length=null, $options=null) |
Protected Attributes |
| $_fetchMode = PDO::FETCH_ASSOC |
Detailed Description
Definition at line 40 of file Pdo.php.
Member Function Documentation
_bindParam |
( |
$ |
parameter, |
|
|
&$ |
variable, |
|
|
$ |
type = null , |
|
|
$ |
length = null , |
|
|
$ |
options = null |
|
) |
| [protected] |
Binds a parameter to the specified variable name.
- Parameters:
-
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. |
- Returns:
- bool
- Exceptions:
-
Reimplemented in Zend_Db_Statement_Pdo_Ibm.
Definition at line 100 of file Pdo.php.
_execute |
( |
array $ |
params = null ) |
|
Executes a prepared statement.
- Parameters:
-
array | $params | OPTIONAL Values to bind to parameter placeholders. |
- Returns:
- bool
- Exceptions:
-
Definition at line 224 of file Pdo.php.
_prepare |
( |
$ |
sql ) |
[protected] |
Prepare a string SQL statement and create a statement object.
- Parameters:
-
- Returns:
- void
- Exceptions:
-
Reimplemented from Zend_Db_Statement.
Definition at line 55 of file Pdo.php.
bindColumn |
( |
$ |
column, |
|
|
&$ |
param, |
|
|
$ |
type = null |
|
) |
| |
Bind a column of the statement result set to a PHP variable.
- Parameters:
-
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 |
- Returns:
- bool
- Exceptions:
-
Reimplemented from Zend_Db_Statement.
Definition at line 75 of file Pdo.php.
bindValue |
( |
$ |
parameter, |
|
|
$ |
value, |
|
|
$ |
type = null |
|
) |
| |
Binds a value to a parameter.
- Parameters:
-
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. |
- Returns:
- bool
- Exceptions:
-
Reimplemented from Zend_Db_Statement.
Definition at line 130 of file Pdo.php.
Returns the number of columns in the result set. Returns null if the statement has no result set metadata.
- Returns:
- int The number of columns.
- Exceptions:
-
Implements Zend_Db_Statement_Interface.
Definition at line 173 of file Pdo.php.
Retrieves the error code, if any, associated with the last operation on the statement handle.
- Returns:
- string error code.
- Exceptions:
-
Implements Zend_Db_Statement_Interface.
Definition at line 190 of file Pdo.php.
Retrieves an array of error information, if any, associated with the last operation on the statement handle.
- Returns:
- array
- Exceptions:
-
Implements Zend_Db_Statement_Interface.
Definition at line 207 of file Pdo.php.
fetch |
( |
$ |
style = null , |
|
|
$ |
cursor = null , |
|
|
$ |
offset = null |
|
) |
| |
Fetches a row from the result set.
- Parameters:
-
int | $style | OPTIONAL Fetch mode for this fetch operation. |
int | $cursor | OPTIONAL Absolute, relative, or other. |
int | $offset | OPTIONAL Number for absolute or relative cursors. |
- Returns:
- mixed Array, object, or scalar depending on fetch mode.
- Exceptions:
-
Implements Zend_Db_Statement_Interface.
Definition at line 247 of file Pdo.php.
fetchAll |
( |
$ |
style = null , |
|
|
$ |
col = null |
|
) |
| |
Returns an array containing all of the result set rows.
- Parameters:
-
int | $style | OPTIONAL Fetch mode. |
int | $col | OPTIONAL Column number, if fetch mode is by column. |
- Returns:
- array Collection of rows, each in a format by the fetch mode.
- Exceptions:
-
Reimplemented from Zend_Db_Statement.
Reimplemented in Zend_Db_Statement_Pdo_Ibm, and Zend_Db_Statement_Pdo_Oci.
Definition at line 278 of file Pdo.php.
fetchColumn |
( |
$ |
col = 0 ) |
|
Returns a single column from the next row of a result set.
- Parameters:
-
int | $col | OPTIONAL Position of the column to fetch. |
- Returns:
- string
- Exceptions:
-
Reimplemented from Zend_Db_Statement.
Definition at line 305 of file Pdo.php.
fetchObject |
( |
$ |
class = 'stdClass' , |
|
|
array $ |
config = array() |
|
) |
| |
Fetches the next row and returns it as an object.
- Parameters:
-
string | $class | OPTIONAL Name of the class to create. |
array | $config | OPTIONAL Constructor arguments for the class. |
- Returns:
- mixed One object instance of the specified class.
- Exceptions:
-
Reimplemented from Zend_Db_Statement.
Definition at line 323 of file Pdo.php.
Retrieve a statement attribute.
- Parameters:
-
integer | $key | Attribute name. |
- Returns:
- mixed Attribute value.
- Exceptions:
-
Reimplemented from Zend_Db_Statement.
Definition at line 340 of file Pdo.php.
getColumnMeta |
( |
$ |
column ) |
|
Returns metadata for a column in a result set.
- Parameters:
-
- Returns:
- mixed
- Exceptions:
-
Definition at line 357 of file Pdo.php.
Required by IteratorAggregate interface
- Returns:
- IteratorIterator
Definition at line 265 of file Pdo.php.
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:
- bool
- Exceptions:
-
Implements Zend_Db_Statement_Interface.
Definition at line 375 of file Pdo.php.
Returns the number of rows affected by the execution of the last INSERT, DELETE, or UPDATE statement executed by this statement object.
- Returns:
- int The number of rows affected.
- Exceptions:
-
Implements Zend_Db_Statement_Interface.
Definition at line 393 of file Pdo.php.
setAttribute |
( |
$ |
key, |
|
|
$ |
val |
|
) |
| |
Set a statement attribute.
- Parameters:
-
string | $key | Attribute name. |
mixed | $val | Attribute value. |
- Returns:
- bool
- Exceptions:
-
Reimplemented from Zend_Db_Statement.
Definition at line 411 of file Pdo.php.
Set the default fetch mode for this statement.
- Parameters:
-
- Returns:
- bool
- Exceptions:
-
Reimplemented from Zend_Db_Statement.
Definition at line 428 of file Pdo.php.
The documentation for this class was generated from the following file:
- E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Db/Statement/Pdo.php