public function relations()
{
return array(
'groups' => array(self::MANY_MANY, 'Group', 'groupemployee(group_id, employee_id)'),
}
table groupemployee have 3 fileds,there are: group_id,employee_id,ordering.
I want list employees with group_id=1 and order by ordering.
here is code in another controller action,but it don't work,i don't know why,please help me.
$dataProvider=new CActiveDataProvider('Employee', array(
'criteria'=>array(
'condition'=>'status = :status',
'params'=>array(':status'=>1),
'with'=>array(
array('groups'=>array('condition'=>'group_id = 1','order'=>'ordering'))
),
),
'pagination'=>array(
'pageSize'=>20,
),
));
thanks a lot!

Help














