Предположим, у меня есть такие данные
Таблица групп
Код: Выделить всё
id | Name
1 | admin
2 | guest
3 | editor
4 | moderator
Код: Выделить всё
$this->groups_ = new Group();
$this->groups_->where('id >', 1)->get();
//so I can select the users that are not admin
$users = new User();
$users->where_related('group',$id,$this->groups_)->get();
Код: Выделить всё
$this->groups_->where('id
Подробнее здесь: [url]https://stackoverflow.com/questions/7980285/filtering-resultset-with-codeigniter-and-datamapper[/url]
Мобильная версия