mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed SQL bug
This commit is contained in:
@ -67,7 +67,7 @@ function GetRules($device) {
|
||||
$where .= " || alert_map.target = ?";
|
||||
$params[] = 'g'.$group;
|
||||
}
|
||||
return dbFetchRows('SELECT alert_rules.* FROM alert_rules,alert_map WHERE (alert_rules.device_id = -1 || alert_rules.device_id = ? ) || ( alert_rules.id=alert_map.rule && ( alert_map.target = ? '.$where.' ) )',$params);
|
||||
return dbFetchRows('SELECT alert_rules.* FROM alert_rules LEFT JOIN alert_map ON alert_rules.id=alert_map.rule WHERE (alert_rules.device_id = -1 || alert_rules.device_id = ? ) || ( alert_map.target = ? '.$where.' )',$params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user