mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-04 08:02:05 +02:00
Merge pull request #1130 from laf/issue-1129
Moved sql where line to be included in count
This commit is contained in:
@@ -16,14 +16,14 @@ if (!isset($sort) || empty($sort)) {
|
|||||||
$sort = 'last_polled_timetaken DESC';
|
$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";
|
$count_sql = "SELECT COUNT(`D`.`device_id`) $sql";
|
||||||
$total = dbFetchCell($count_sql);
|
$total = dbFetchCell($count_sql);
|
||||||
if (empty($total)) {
|
if (empty($total)) {
|
||||||
$total = 0;
|
$total = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql .= " AND D.status ='1' AND D.ignore='0' AND D.disabled='0' ORDER BY $sort";
|
|
||||||
|
|
||||||
if (isset($current)) {
|
if (isset($current)) {
|
||||||
$limit_low = ($current * $rowCount) - ($rowCount);
|
$limit_low = ($current * $rowCount) - ($rowCount);
|
||||||
$limit_high = $rowCount;
|
$limit_high = $rowCount;
|
||||||
|
|||||||
Reference in New Issue
Block a user