abstract public function Connection::queryRange

Same name in this branch
  1. 9.x drupal/core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::queryRange()
  2. 9.x drupal/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection::queryRange()
  3. 9.x drupal/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php \Drupal\Core\Database\Driver\sqlite\Connection::queryRange()
  4. 9.x drupal/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php \Drupal\Core\Database\Driver\pgsql\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

$query: A string containing an SQL query.

$args: An array of values to substitute into the query at placeholder markers.

$from: The first result row to return.

$count: The maximum number of result rows to return.

$options: 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.

3 methods override Connection::queryRange()
Connection::queryRange in drupal/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
Runs a limited-range query on this database object.
Connection::queryRange in drupal/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
Runs a limited-range query on this database object.
Connection::queryRange in drupal/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
Runs a limited-range query on this database object.

File

drupal/core/lib/Drupal/Core/Database/Connection.php, line 1030
Definition of Drupal\Core\Database\Connection

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public abstract function queryRange($query, $from, $count, array $args = array(), array $options = array());