I am having a problem with limit not working
im using it like this
where am i going wrong??
public function withdrawTickets($groups,$number)
{
$tickets=new CActiveDataProvider('Tickets',array(
'criteria'=>array(
'condition'=>'games_id=:games_id and user_id= :user_id and group_id is NULL ',
'limit'=>5; << this does not work
'params'=>array(':games_id'=>$groups->data[$number]->games->id,':user_id'=>Yii::app()->user->id),
),
));
foreach($tickets->data as $value)
{
$value->group_id=$_POST['Membership']['group_id'];
//$value->joined=1;
$value->save();
}