function Connection::queryRange

Same name in this branch
  1. 8.9.x core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection::queryRange()
  2. 8.9.x core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php \Drupal\Core\Database\Driver\sqlite\Connection::queryRange()
  3. 8.9.x core/lib/Drupal/Core/Database/Driver/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection::queryRange()
  4. 8.9.x core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php \Drupal\Core\Database\Driver\pgsql\Connection::queryRange()
Same name in other branches
  1. 9 core/modules/sqlite/src/Driver/Database/sqlite/Connection.php \Drupal\sqlite\Driver\Database\sqlite\Connection::queryRange()
  2. 9 core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection::queryRange()
  3. 9 core/modules/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection::queryRange()
  4. 9 core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection::queryRange()
  5. 9 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::queryRange()
  6. 10 core/modules/sqlite/src/Driver/Database/sqlite/Connection.php \Drupal\sqlite\Driver\Database\sqlite\Connection::queryRange()
  7. 10 core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection::queryRange()
  8. 10 core/modules/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection::queryRange()
  9. 10 core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection::queryRange()
  10. 10 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::queryRange()
  11. 11.x core/modules/sqlite/src/Driver/Database/sqlite/Connection.php \Drupal\sqlite\Driver\Database\sqlite\Connection::queryRange()
  12. 11.x core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection::queryRange()
  13. 11.x core/modules/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection::queryRange()
  14. 11.x core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection::queryRange()
  15. 11.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\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.

5 methods override Connection::queryRange()
Connection::queryRange in core/tests/fixtures/database_drivers/custom/fake/Connection.php
Runs a limited-range query on this database object.
Connection::queryRange in core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
Runs a limited-range query on this database object.
Connection::queryRange in core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
Runs a limited-range query on this database object.
Connection::queryRange in core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
Runs a limited-range query on this database object.
StubConnection::queryRange in core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php
Runs a limited-range query on this database object.

File

core/lib/Drupal/Core/Database/Connection.php, line 1343

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.