I want to do some deleting…
$critiria = new CDbCriteria;
$critiria->order = 'id ASC';
$critiria->limit = '1';
$critiria->condition = 'type=:type';
$critiria->params = array(
':type'=> 3
);
CVarDumper::dump(OneXN::model()->findAll($critiria),10,true);
//not works ->
CVarDumper::dump(OneXN::model()->deleteAll($critiria),10,true);
why the last not work? the findAll added just to check it works, and it indeed works…
dont know how to use the AR delete for this one…
I can create method and go with dao…
I think the problem is that delete dont accept critiria, it accept some sort of array, so maybe someone will exmplain how to convert my critiria to array that delete all will understand