Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
enh(BE): replace LIKE with equal
Browse files Browse the repository at this point in the history
  • Loading branch information
sc979 committed Nov 6, 2019
1 parent 9644aa2 commit 29573f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,9 @@
}

if ($hostgroups) {
$rq1 .= " AND hosts.host_id = hg.host_id "
. "AND hg.hostgroup_id IN (:hostGroup) "
. "AND hg.hostgroup_id = hg2.hostgroup_id ";
// only one value is returned from the current "select" filter
$rq1 .= " AND hosts.host_id = hg.host_id
AND hg.hostgroup_id = :hostGroup
AND hg.hostgroup_id = hg2.hostgroup_id ";
$queryValues['hostGroup'] = [\PDO::PARAM_INT => $hostgroups];
}

Expand Down
3 changes: 1 addition & 2 deletions www/include/monitoring/status/Services/xml/serviceXML.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@
// HostGroup Filter
if (isset($hostgroups) && $hostgroups != 0) {
$request .= " AND hg.hostgroup_id = hg2.hostgroup_id
AND hg.host_id = h.host_id AND hg.hostgroup_id IN (:hostGroup) ";
// only one value is returned from the current "select" filter
AND hg.host_id = h.host_id AND hg.hostgroup_id IN = :hostGroup ";
$queryValues['hostGroup'] = [\PDO::PARAM_INT => $hostgroups];
}

Expand Down

0 comments on commit 29573f9

Please sign in to comment.