summaryrefslogtreecommitdiff
path: root/includes/pager.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pager.inc')
-rw-r--r--includes/pager.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/pager.inc b/includes/pager.inc
index c76a416a8..aba3db575 100644
--- a/includes/pager.inc
+++ b/includes/pager.inc
@@ -217,7 +217,7 @@ function pager_query($query, $limit = 10, $element = 0, $count_query = NULL) {
$pager_page_array = explode(',', $page);
// We calculate the total of pages as ceil(items / limit).
- $pager_total_items[$element] = db_result(db_query($count_query, $args));
+ $pager_total_items[$element] = db_query($count_query, $args)->fetchField();
$pager_total[$element] = ceil($pager_total_items[$element] / $limit);
$pager_page_array[$element] = max(0, min((int)$pager_page_array[$element], ((int)$pager_total[$element]) - 1));
return db_query_range($query, $args, $pager_page_array[$element] * $limit, $limit);