mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Eventlog query now uses event_id as already indexed
This commit is contained in:
@@ -29,7 +29,7 @@ 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%')";
|
$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";
|
$count_sql = "SELECT COUNT(event_id) $sql";
|
||||||
$total = dbFetchCell($count_sql, $param);
|
$total = dbFetchCell($count_sql, $param);
|
||||||
if (empty($total)) {
|
if (empty($total)) {
|
||||||
$total = 0;
|
$total = 0;
|
||||||
|
Reference in New Issue
Block a user