Driver-level statement
| Methods | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
public
|
bindValue(string|int $param, mixed $value, int $type = ParameterType::STRING): bool
Binds a value to a corresponding named (not supported by mysqli driver, see comment below) or positional
placeholder in…
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. As mentioned above, the named parameters are not natively supported by the mysqli driver, use executeQuery(), fetchAll(), fetchArray(), fetchColumn(), fetchAssoc() methods to have the named parameter emulated by doctrine. Parameters
ReturnsTRUE on success or FALSE on failure. Throws
Implemented by |
# | ||||||||||
public
|
bindParam(string|int $param, mixed &$variable, int $type = ParameterType::STRING, int|null $length = null): bool
Binds a PHP variable to a corresponding named (not supported by mysqli driver, see comment below) or question
mark…
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 {@see bindValue()}, the variable is bound as a reference and will only be evaluated at the time that PDOStatement->execute() is called. As mentioned above, the named parameters are not natively supported by the mysqli driver, use executeQuery(), fetchAll(), fetchArray(), fetchColumn(), fetchAssoc() methods to have the named parameter emulated by doctrine. Most parameters are input parameters, that is, parameters that are used in a read-only fashion to build up the query. Some drivers support the invocation of stored procedures that return data as output parameters, and some also as input/output parameters that both send in data and are updated to receive it. DeprecatedUse {@see bindValue()} instead. Parameters
ReturnsTRUE on success or FALSE on failure. Throws
Implemented by |
# | ||||||||||
public
|
execute(mixed[]|null $params = null): Result
Executes a prepared statement
Executes a prepared statement If the prepared statement included parameter markers, you must either: call {@see bindParam()} to bind PHP variables to the parameter markers: bound variables pass their value as input and receive the output value, if any, of their associated parameter markers or pass an array of input-only parameter values. Parameters
Throws
Implemented by |
# | ||||||||||