Documentation

Statement extends PDOStatement
in package

PDO SQL Server Statement

Table of Contents

bindParam()  : bool
Binds a PHP variable to a corresponding named (not supported by mysqli driver, see comment below) or question mark placeholder in the SQL statement that was use to prepare the statement. Unlike PDOStatement->bindValue(), the variable is bound as a reference and will only be evaluated at the time that PDOStatement->execute() is called.
bindValue()  : bool
Binds a value to a corresponding named (not supported by mysqli driver, see comment below) or positional placeholder in the SQL statement that was used to prepare the statement.
closeCursor()  : mixed
{@inheritdoc}
execute()  : bool
Executes a prepared statement
fetch()  : mixed
{@inheritdoc}
fetchAll()  : mixed
{@inheritdoc}
fetchColumn()  : mixed
{@inheritdoc}
setFetchMode()  : mixed
{@inheritdoc}
__construct()  : mixed
Protected constructor.

Methods

bindParam()

Binds a PHP variable to a corresponding named (not supported by mysqli driver, see comment below) or question mark placeholder in the SQL statement that was use to prepare the statement. Unlike PDOStatement->bindValue(), the variable is bound as a reference and will only be evaluated at the time that PDOStatement->execute() is called.

public bindParam(mixed $column, mixed &$variable[, mixed $type = PDO::PARAM_STR ][, mixed $length = null ][, mixed $driverOptions = null ]) : bool
Parameters
$column : mixed

Parameter identifier. For a prepared statement using named placeholders, this will be a parameter name of the form :name. For a prepared statement using question mark placeholders, this will be the 1-indexed position of the parameter.

$variable : mixed

Name of the PHP variable to bind to the SQL statement parameter.

$type : mixed = PDO::PARAM_STR

Explicit data type for the parameter using the PDO::PARAM_* constants. To return an INOUT parameter from a stored procedure, use the bitwise OR operator to set the PDO::PARAM_INPUT_OUTPUT bits for the data_type parameter.

$length : mixed = null

You must specify maxlength when using an OUT bind so that PHP allocates enough memory to hold the returned value.

$driverOptions : mixed = null
Return values
bool —

TRUE on success or FALSE on failure.

bindValue()

Binds a value to a corresponding named (not supported by mysqli driver, see comment below) or positional placeholder in the SQL statement that was used to prepare the statement.

public bindValue(mixed $param, mixed $value[, mixed $type = PDO::PARAM_STR ]) : bool
Parameters
$param : mixed

Parameter identifier. For a prepared statement using named placeholders, this will be a parameter name of the form :name. For a prepared statement using question mark placeholders, this will be the 1-indexed position of the parameter.

$value : mixed

The value to bind to the parameter.

$type : mixed = PDO::PARAM_STR

Explicit data type for the parameter using the PDO::PARAM_* constants.

Return values
bool —

TRUE on success or FALSE on failure.

closeCursor()

{@inheritdoc}

public closeCursor() : mixed
Return values
mixed —

execute()

Executes a prepared statement

public execute([mixed $params = null ]) : bool
Parameters
$params : mixed = null

An array of values with as many elements as there are bound parameters in the SQL statement being executed.

Return values
bool —

TRUE on success or FALSE on failure.

fetch()

{@inheritdoc}

public fetch([mixed $fetchMode = null ][, mixed $cursorOrientation = null ][, mixed $cursorOffset = null ]) : mixed
Parameters
$fetchMode : mixed = null
$cursorOrientation : mixed = null
$cursorOffset : mixed = null
Return values
mixed —

fetchAll()

{@inheritdoc}

public fetchAll([mixed $fetchMode = null ][, mixed $fetchArgument = null ][, mixed $ctorArgs = null ]) : mixed
Parameters
$fetchMode : mixed = null
$fetchArgument : mixed = null
$ctorArgs : mixed = null
Return values
mixed —

fetchColumn()

{@inheritdoc}

public fetchColumn(mixed $columnIndex) : mixed
Parameters
$columnIndex : mixed
Return values
mixed —

setFetchMode()

{@inheritdoc}

public setFetchMode(mixed $fetchMode[, mixed $arg2 = null ][, mixed $arg3 = null ]) : mixed
Parameters
$fetchMode : mixed
$arg2 : mixed = null
$arg3 : mixed = null
Return values
mixed —

__construct()

Protected constructor.

protected __construct() : mixed
Return values
mixed —

Search results