From 79ae1acffa18b04354a1cafe6a1306c52cf3556f Mon Sep 17 00:00:00 2001 From: laf Date: Fri, 27 Mar 2015 16:47:26 +0000 Subject: [PATCH] Updated tables to include other SQL queries in total count --- html/includes/table/eventlog.inc.php | 6 +++--- html/includes/table/poll-log.inc.php | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/html/includes/table/eventlog.inc.php b/html/includes/table/eventlog.inc.php index 88b33132bd..571173803c 100644 --- a/html/includes/table/eventlog.inc.php +++ b/html/includes/table/eventlog.inc.php @@ -21,13 +21,13 @@ if ($_SESSION['userlevel'] >= '5') { $param[] = $_SESSION['user_id']; } -$count_sql = "SELECT COUNT(datetime) $sql"; -$total = dbFetchCell($count_sql,$param); - if (isset($searchPhrase) && !empty($searchPhrase)) { $sql .= " AND (`D`.`hostname` LIKE '%$searchPhrase%' OR `E`.`datetime` LIKE '%$searchPhrase%' OR `E`.`message` LIKE '%$searchPhrase%' OR `E`.`type` LIKE '%$searchPhrase%')"; } +$count_sql = "SELECT COUNT(datetime) $sql"; +$total = dbFetchCell($count_sql,$param); + if (!isset($sort) || empty($sort)) { $sort = 'datetime DESC'; } diff --git a/html/includes/table/poll-log.inc.php b/html/includes/table/poll-log.inc.php index 53ccaa6133..edf7d6ed2c 100644 --- a/html/includes/table/poll-log.inc.php +++ b/html/includes/table/poll-log.inc.php @@ -1,7 +1,6 @@ " 'graphs', 'group' => 'poller')). "'>" .$device['hostname']. "", 'last_polled' => $device['last_polled'],