From 03ed5e6c7db984ea961ffa6d05a21c0e1901d48b Mon Sep 17 00:00:00 2001 From: laf Date: Mon, 25 May 2015 21:54:57 +0100 Subject: [PATCH] Moved sql where line to be included in count --- html/includes/table/poll-log.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/includes/table/poll-log.inc.php b/html/includes/table/poll-log.inc.php index 93d9259f6..3a0ca3213 100644 --- a/html/includes/table/poll-log.inc.php +++ b/html/includes/table/poll-log.inc.php @@ -16,14 +16,14 @@ if (!isset($sort) || empty($sort)) { $sort = 'last_polled_timetaken DESC'; } +$sql .= " AND D.status ='1' AND D.ignore='0' AND D.disabled='0' ORDER BY $sort"; + $count_sql = "SELECT COUNT(`D`.`device_id`) $sql"; $total = dbFetchCell($count_sql); if (empty($total)) { $total = 0; } -$sql .= " AND D.status ='1' AND D.ignore='0' AND D.disabled='0' ORDER BY $sort"; - if (isset($current)) { $limit_low = ($current * $rowCount) - ($rowCount); $limit_high = $rowCount;