diff --git a/web/includes/Group.php b/web/includes/Group.php index 543665655..ee86a320c 100644 --- a/web/includes/Group.php +++ b/web/includes/Group.php @@ -249,7 +249,7 @@ $group_options[$Group->Id()] = str_repeat( ' ', $depth ) . $Group->Name(); $MonitorIds = array_merge( $MonitorIds, dbFetchAll( 'SELECT MonitorId FROM Groups_Monitors WHERE GroupId IN (SELECT Id FROM Groups WHERE ParentId = ?)', 'MonitorId', array($group_id) ) ); } - $groupSql = " find_in_set( Id, '".implode( ',', $MonitorIds )."' )"; + $groupSql = " find_in_set( M.Id, '".implode( ',', $MonitorIds )."' )"; } return $groupSql; } # end public static function get_group_sql( $group_id ) diff --git a/web/skins/classic/views/_monitor_filters.php b/web/skins/classic/views/_monitor_filters.php index 7633200ea..9d3a12ad6 100644 --- a/web/skins/classic/views/_monitor_filters.php +++ b/web/skins/classic/views/_monitor_filters.php @@ -85,7 +85,7 @@ if ( ! is_array( $selected_monitor_ids ) ) { } # end foreach filter if ( ! empty( $user['MonitorIds'] ) ) { $ids = explode(',', $user['MonitorIds'] ); - $conditions[] = 'Id IN ('.implode(',',array_map( function(){return '?';}, $ids) ).')'; + $conditions[] = 'M.Id IN ('.implode(',',array_map( function(){return '?';}, $ids) ).')'; $values += $ids; }