From 23a6f8288ff0ee199ead7c5ad26f38307d305895 Mon Sep 17 00:00:00 2001 From: Sesostris Vieira Date: Tue, 10 Jun 2014 16:22:22 -0300 Subject: [PATCH] Adicionar limites para select --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 409d88c..679e34b 100644 --- a/index.php +++ b/index.php @@ -160,8 +160,8 @@ if ($sort == 'timecreated') { $sql .= " ORDER BY u.{$sort}"; } -$userlist = $DB->get_records_sql($sql, $params + $where_params); -$total = count($userlist); +$total = $DB->count_records_sql($sql, $params + $where_params); +$userlist = $DB->get_records_sql($sql, $params + $where_params, $start); if ($csv && $userlist) { // Only show CSV if there are some users $shortname = format_string($course->shortname, true, array('context' => $context));