id--name--group_id
1--Иван--1,3,5,7,8,9,10
if(isset($filter['group_id']))
$group_id_filter = $this->db->placehold('AND u.group_id in(?@)', (array)$filter['group_id']);
select * from users as u join user_group as ug on u.id = ug.user_id and ug.group_id = 3