| Methods |
public
|
bindValue(string|int $param, mixed $value, mixed $type = ParameterType::STRING): bool
Binds a parameter value to the statement.
Binds a parameter value to the statement.
The value can optionally be bound with a DBAL mapping type.
If bound with a DBAL mapping type, the binding type is derived from the mapping
type and the value undergoes the conversion routines of the mapping type before
being bound.
Parameters
| $param |
The name or position of the parameter.
|
| $value |
The value of the parameter.
|
| $type |
Either a PDO binding type or a DBAL mapping type name or instance.
|
Returns
TRUE on success, FALSE on failure.
Throws
|
#
|
public
|
bindParam(string|int $param, mixed &$variable, int $type = ParameterType::STRING, int|null $length = null): bool
Binds a parameter to a value by reference.
Binds a parameter to a value by reference.
Binding a parameter by reference does not support DBAL mapping types.
Deprecated
Use {@see bindValue()} instead.
Parameters
| $param |
The name or position of the parameter.
|
| $variable |
The reference to the variable to bind.
|
| $type |
The binding type.
|
| $length |
Must be specified when using an OUT bind
so that PHP allocates enough memory to hold the returned value.
|
Returns
TRUE on success, FALSE on failure.
Throws
|
#
|
public
|
execute(mixed[]|null $params = null): Result
Executes the statement with the currently bound parameters.
Executes the statement with the currently bound parameters.
Deprecated
Statement::execute() is deprecated, use Statement::executeQuery() or executeStatement() instead
Throws
|
#
|
public
|
executeQuery(mixed[] $params = []): Result
Executes the statement with the currently bound parameters and return result.
Executes the statement with the currently bound parameters and return result.
Throws
|
#
|
public
|
executeStatement(mixed[] $params = []): int
Executes the statement with the currently bound parameters and return affected rows.
Executes the statement with the currently bound parameters and return affected rows.
Throws
|
#
|
public
|
getWrappedStatement(): Statement
Gets the wrapped driver statement.
Gets the wrapped driver statement.
|
#
|