\DebugBar\DataCollector\PDOTraceablePDOStatement

A traceable PDO statement to use with Traceablepdo

Summary

Methods
Properties
Constants
bindColumn()
bindParam()
bindValue()
execute()
No public properties found
No constants found
__construct()
$pdo
$boundParameters
N/A
No private methods found
No private properties found
N/A

Properties

$pdo

$pdo : \PDO

Type

\PDO

$boundParameters

$boundParameters : array

Type

array

Methods

bindColumn()

bindColumn(mixed  $column, mixed  $param, integer  $type = null, integer  $maxlen = null, mixed  $driverdata = null) : boolean

Bind a column to a PHP variable

Parameters

mixed $column

Number of the column (1-indexed) or name of the column in the result set

mixed $param

Name of the PHP variable to which the column will be bound.

integer $type

[optional] Data type of the parameter, specified by the PDO::PARAM_* constants.

integer $maxlen

[optional] A hint for pre-allocation.

mixed $driverdata

[optional] Optional parameter(s) for the driver.

Returns

boolean —

TRUE on success or FALSE on failure.

bindParam()

bindParam(mixed  $parameter, mixed  $variable, integer  $data_type = \PDO::PARAM_STR, integer  $length = null, mixed  $driver_options = null) : boolean

Binds a parameter to the specified variable name

Parameters

mixed $parameter

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.

mixed $variable

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

integer $data_type

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

integer $length

[optional] Length of the data type. To indicate that a parameter is an OUT parameter from a stored procedure, you must explicitly set the length.

mixed $driver_options

[optional]

Returns

boolean —

TRUE on success or FALSE on failure.

bindValue()

bindValue(mixed  $parameter, mixed  $value, integer  $data_type = \PDO::PARAM_STR) : boolean

Binds a value to a parameter

Parameters

mixed $parameter

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.

mixed $value

The value to bind to the parameter.

integer $data_type

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

Returns

boolean —

TRUE on success or FALSE on failure.

execute()

execute(array  $input_parameters = null) : boolean

Executes a prepared statement

Parameters

array $input_parameters

[optional] An array of values with as many elements as there are bound parameters in the SQL statement being executed. All values are treated as PDO::PARAM_STR.

Returns

boolean —

TRUE on success or FALSE on failure.