db ->select('id') ->where_in('id', array_values(array_unique($ids))) ->where('is_active', 1) ->where('allow_posting', 1) ->get('accounts') ->result_array(); return array_map('intval', array_column($rows, 'id')); } }