PDOStatement
class PDOStatement implements IteratorAggregate (View source)
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 1.0.0)
Represents a prepared statement and, after the statement is executed, an
associated result set.
Properties
string | $queryString |
Methods
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Executes a prepared statement
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Fetches the next row from a result set
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Binds a parameter to the specified variable name
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Bind a column to a PHP variable
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 1.0.0)
Binds a value to a parameter
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Returns the number of rows affected by the last SQL statement
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0)
Returns a single column from the next row of a result set
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Returns an array containing all of the result set rows
No description
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Fetch the SQLSTATE associated with the last operation on the statement handle
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Fetch extended error information associated with the last operation on the statement handle
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
Set a statement attribute
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
Retrieve a statement attribute
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
Returns the number of columns in the result set
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
Returns metadata for a column in a result set
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
Set the default fetch mode for this statement
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
Advances to the next rowset in a multi-rowset statement handle
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0)
Closes the cursor, enabling the statement to be executed again.
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0)
Dump an SQL prepared command
No description
No description
No description
No description
Details
bool
execute(array $params = null)
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Executes a prepared statement
mixed
fetch(int $mode = PDO::FETCH_DEFAULT, int $cursorOrientation = PDO::FETCH_ORI_NEXT, int $cursorOffset = 0)
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Fetches the next row from a result set
bool
bindParam(mixed $param, mixed $var, int $type = PDO::PARAM_STR, int $maxLength = 0, mixed $driverOptions = null)
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Binds a parameter to the specified variable name
bool
bindColumn(mixed $column, mixed $var, int $type = PDO::PARAM_STR, int $maxLength = 0, mixed $driverOptions = null)
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Bind a column to a PHP variable
bool
bindValue(mixed $param, mixed $value, int $type = PDO::PARAM_STR)
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 1.0.0)
Binds a value to a parameter
int
rowCount()
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Returns the number of rows affected by the last SQL statement
mixed
fetchColumn(int $column = 0)
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0)
Returns a single column from the next row of a result set
array
fetchAll(int $mode = PDO::FETCH_DEFAULT, $fetch_argument = null, mixed ...$args)
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Returns an array containing all of the result set rows
object|false
fetchObject(T> $class = "stdClass", array $constructorArgs = [])
No description
string|null
errorCode()
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Fetch the SQLSTATE associated with the last operation on the statement handle
array
errorInfo()
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
Fetch extended error information associated with the last operation on the statement handle
bool
setAttribute(int $attribute, mixed $value)
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
Set a statement attribute
mixed
getAttribute(int $name)
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
Retrieve a statement attribute
int
columnCount()
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
Returns the number of columns in the result set
array|false
getColumnMeta(int $column)
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
Returns metadata for a column in a result set
bool
setFetchMode(int $mode, mixed ...$args)
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
Set the default fetch mode for this statement
bool
nextRowset()
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
Advances to the next rowset in a multi-rowset statement handle
bool
closeCursor()
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0)
Closes the cursor, enabling the statement to be executed again.
bool|null
debugDumpParams()
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0)
Dump an SQL prepared command
final
__wakeup()
No description
final
__sleep()
No description
Traversable
getIterator()
No description
connect()
No description