public function Connection::queryRange in Drupal driver for SQL Server and SQL Azure 8.2
Same name and namespace in other branches
- 8 drivers/lib/Drupal/Driver/Database/sqlsrv/Connection.php \Drupal\Driver\Database\sqlsrv\Connection::queryRange()
- 3.0.x drivers/lib/Drupal/Driver/Database/sqlsrv/Connection.php \Drupal\Driver\Database\sqlsrv\Connection::queryRange()
Runs a limited-range query on this database object.
Use this as a substitute for ->query() when a subset of the query is to be returned. User-supplied arguments to the query should be passed in as separate parameters so that they can be properly escaped to avoid SQL injection attacks.
Parameters
string $query: A string containing an SQL query.
int $from: The first result row to return.
int $count: The maximum number of result rows to return.
array $args: (optional) An array of values to substitute into the query at placeholder markers.
array $options: (optional) An array of options on the query.
Return value
\Drupal\Core\Database\StatementInterface A database query result resource, or NULL if the query was not executed correctly.
Overrides Connection::queryRange
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Connection.php, line 428 - Definition of Drupal\Driver\Database\sqlsrv\Connection
Class
- Connection
- Temporary tables: temporary table support is done by means of global temporary tables (#) to avoid the use of DIRECT QUERIES. You can enable and disable the use of direct queries with $this->driver_settings->defaultDirectQuery =…
Namespace
Drupal\Driver\Database\sqlsrvCode
public function queryRange($query, $from, $count, array $args = [], array $options = []) {
$query = $this
->addRangeToQuery($query, $from, $count);
return $this
->query($query, $args, $options);
}