function db_query_range
Search API
7.x db.inc | db_query_range($query, $args = array(), $from, $count = 10) |
6.x db.inc | db_query_range($query, $args = array(), $from, $count = 10) |
Adds a simple LIMIT statement to a query. Adapted from Drupal 6: https://api.drupal.org/api/drupal/includes%21database.mysql.inc/function...
1 call to db_query_range()
- pager_query in includes/
db.inc - Code adapted from Drupal 6: https://api.drupal.org/api/drupal/includes%21pager.inc/function/pager_qu...
File
- includes/
db.inc, line 213 - This file contains mostly db shortcuts.
Code
function db_query_range($query, $args = array(), $from, $count = 10) {
$query .= ' LIMIT ' . (int) $from . ', ' . (int) $count;
return db_query($query, $args);
}