mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed edit processors/storage/memory search query (#9172)
* Fixed edit processors search query * Fixed 2 more search queries
This commit is contained in:
@@ -6,7 +6,7 @@ $sql = " FROM `mempools` AS `M` LEFT JOIN `devices` AS `D` ON `M`.`device_id` =
|
|||||||
$param[] = $device_id;
|
$param[] = $device_id;
|
||||||
|
|
||||||
if (isset($searchPhrase) && !empty($searchPhrase)) {
|
if (isset($searchPhrase) && !empty($searchPhrase)) {
|
||||||
$sql .= " AND (`D`.`hostname` LIKE '%$searchPhrase%' OR `M`.`mempool_descr` LIKE '%$searchPhrase%' OR `S.`mempool_perc` LIKE '%$searchPhrase%' OR `M`.`mempool_perc_warn` LIKE '%$searchPhrase%')";
|
$sql .= " AND (`D`.`hostname` LIKE '%$searchPhrase%' OR `M`.`mempool_descr` LIKE '%$searchPhrase%' OR `S`.`mempool_perc` LIKE '%$searchPhrase%' OR `M`.`mempool_perc_warn` LIKE '%$searchPhrase%')";
|
||||||
}
|
}
|
||||||
|
|
||||||
$count_sql = "SELECT COUNT(`mempool_id`) $sql";
|
$count_sql = "SELECT COUNT(`mempool_id`) $sql";
|
||||||
|
@@ -6,7 +6,7 @@ $sql = " FROM `processors` AS `P` LEFT JOIN `devices` AS `D` ON `P`.`device_id`
|
|||||||
$param[] = $device_id;
|
$param[] = $device_id;
|
||||||
|
|
||||||
if (isset($searchPhrase) && !empty($searchPhrase)) {
|
if (isset($searchPhrase) && !empty($searchPhrase)) {
|
||||||
$sql .= " AND (`D`.`hostname` LIKE '%$searchPhrase%' OR `P`.`processor_descr` LIKE '%$searchPhrase%' OR `S.`processor_usage` LIKE '%$searchPhrase%' OR `P`.`processor_perc_warn` LIKE '%$searchPhrase%')";
|
$sql .= " AND (`D`.`hostname` LIKE '%$searchPhrase%' OR `P`.`processor_descr` LIKE '%$searchPhrase%' OR `S`.`processor_usage` LIKE '%$searchPhrase%' OR `P`.`processor_perc_warn` LIKE '%$searchPhrase%')";
|
||||||
}
|
}
|
||||||
|
|
||||||
$count_sql = "SELECT COUNT(`processor_id`) $sql";
|
$count_sql = "SELECT COUNT(`processor_id`) $sql";
|
||||||
|
@@ -6,7 +6,7 @@ $sql = " FROM `storage` AS `S` LEFT JOIN `devices` AS `D` ON `S`.`device_id` = `
|
|||||||
$param[] = $device_id;
|
$param[] = $device_id;
|
||||||
|
|
||||||
if (isset($searchPhrase) && !empty($searchPhrase)) {
|
if (isset($searchPhrase) && !empty($searchPhrase)) {
|
||||||
$sql .= " AND (`D`.`hostname` LIKE '%$searchPhrase%' OR `S`.`storage_descr` LIKE '%$searchPhrase%' OR `S.`storage_perc` LIKE '%$searchPhrase%' OR `S`.`storage_perc_warn` LIKE '%$searchPhrase%')";
|
$sql .= " AND (`D`.`hostname` LIKE '%$searchPhrase%' OR `S`.`storage_descr` LIKE '%$searchPhrase%' OR `S`.`storage_perc` LIKE '%$searchPhrase%' OR `S`.`storage_perc_warn` LIKE '%$searchPhrase%')";
|
||||||
}
|
}
|
||||||
|
|
||||||
$count_sql = "SELECT COUNT(`storage_id`) $sql";
|
$count_sql = "SELECT COUNT(`storage_id`) $sql";
|
||||||
|
Reference in New Issue
Block a user