Where Not In Activerecord

hello,

i want to update my table use to where not in.

$data[‘users’]= array(5,13,28); //user id list

$groupMembersModel = new YumUsergroupMembers(); //activerecord model

$groupMembersModel::model()->updateAll(array(

'ugm_status'=>StatusEnums::STATUS_DELETED),


'ugm_group_id=:id and ugm_usr_id not in :userId',


array(':id'=>$data['groupId'], ':userId'=>$data['users']));

where is my error?

Hi I think this what you need


$data['users']= array(5,13,28); //user id list

YumUsergroupMembers::model()->updateAll(array(

		'ugm_status'=>StatusEnums::STATUS_DELETED

	),

	'ugm_group_id=:id AND ugm_usr_id NOT IN :userId',

	array(':id'=>$data['groupId'], ':userId'=>$data['users'])

);