public function Connection::query_execute in Drupal driver for SQL Server and SQL Azure 8.2
Custom function to easy querying data without needing to prepare.
Parameters
mixed $query:
array $args:
mixed $options:
Return value
mixed
Throws
PDOException
1 call to Connection::query_execute()
- Connection::nextId in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ PDO/ Connection.php - Generate a sequence
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ PDO/ Connection.php, line 162
Class
Namespace
Drupal\Driver\Database\sqlsrv\PDOCode
public function query_execute($query, array $args = array(), $options = array()) {
try {
// Make sure we are not preparing statements.
$options[PDO::SQLSRV_ATTR_DIRECT_QUERY] = true;
/** @var Statement */
$stmt = $this
->prepare($query, $options);
$stmt
->execute($args);
return $stmt;
} catch (\PDOException $e) {
$this
->NotifyException($e);
throw $e;
}
}