Create an Delete Statement
Create an Insert Statement
Create a Select statement which returns the given array of rows.
Create an Update Statement
Create a Row Count Statement
Append a new row to the fetch stack.
void
append
(array $row)
Bind a column of the statement result set to a PHP variable.
bool
bindColumn
(string $column, &$param, [mixed $type = null], mixed $param)
-
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
-
&$param
Binds a parameter to the specified variable name.
bool
bindParam
(mixed $parameter, &$variable, [mixed $type = null], [mixed $length = null], [mixed $options = null], mixed $variable)
-
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.
-
&$variable
Binds a value to a parameter.
bool
bindValue
(mixed $parameter, mixed $value, [mixed $type = null])
-
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.
Closes the cursor, allowing the statement to be executed again.
bool
closeCursor
()
Returns the number of columns in the result set.
Returns null if the statement has no result set metadata.
int
columnCount
()
Retrieves the error code, if any, associated with the last operation on the statement handle.
string
errorCode
()
Retrieves an array of error information, if any, associated with the last operation on the statement handle.
array
errorInfo
()
Executes a prepared statement.
bool
execute
([ $params = array()])
-
array
$params: OPTIONAL Values to bind to parameter placeholders.
Fetches a row from the result set.
mixed
fetch
([int $style = null], [int $cursor = null], [int $offset = null])
-
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 an array containing all of the result set rows.
array
fetchAll
([int $style = null], [int $col = null])
-
int
$style: OPTIONAL Fetch mode.
-
int
$col: OPTIONAL Column number, if fetch mode is by column.
Returns a single column from the next row of a result set.
string
fetchColumn
([int $col = 0])
-
int
$col: OPTIONAL Position of the column to fetch.
Fetches the next row and returns it as an object.
mixed
fetchObject
([string $class = 'stdClass'], [ $config = array()])
-
string
$class: OPTIONAL Name of the class to create.
-
array
$config: OPTIONAL Constructor arguments for the class.
Retrieve a statement attribute.
mixed
getAttribute
(string $key)
-
string
$key: Attribute name.
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.
bool
nextRowset
()
Returns the number of rows affected by the execution of the last INSERT, DELETE, or UPDATE statement executed by this statement object.
int
rowCount
()
Set a statement attribute.
bool
setAttribute
(string $key, mixed $val)
-
string
$key: Attribute name.
-
mixed
$val: Attribute value.
Set the default fetch mode for this statement.
bool
setFetchMode
(int $mode)
-
int
$mode: The fetch mode.
void
setQueryProfile
( $qp)
void
setRowCount
(int $rowCount)