public static function Utils::bindArguments in Drupal driver for SQL Server and SQL Azure 4.1.x
Same name and namespace in other branches
- 4.2.x src/Driver/Database/sqlsrv/Utils.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Utils::bindArguments()
- 3.1.x src/Driver/Database/sqlsrv/Utils.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Utils::bindArguments()
- 4.0.x src/Driver/Database/sqlsrv/Utils.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Utils::bindArguments()
Bind the arguments to the statement.
Parameters
StatementWrapper $stmt: Statement.
array $values: Argument values.
2 calls to Utils::bindArguments()
- Insert::execute in src/
Driver/ Database/ sqlsrv/ Insert.php - Runs the query against the database.
- Update::execute in src/
Driver/ Database/ sqlsrv/ Update.php - Executes the UPDATE query.
File
- src/
Driver/ Database/ sqlsrv/ Utils.php, line 21
Class
- Utils
- Utility function for the SQL Server driver.
Namespace
Drupal\sqlsrv\Driver\Database\sqlsrvCode
public static function bindArguments(StatementWrapper $stmt, array &$values) {
foreach ($values as $key => &$value) {
$stmt
->getClientStatement()
->bindParam($key, $value, \PDO::PARAM_STR);
}
}