Can I use array('ordering'=>'ordering+1') in the updateAll?

I tried,but faild.


$this->model->updateAll(array('ordering'=>'ordering+2'));

I want this:




UPDATE article SET ordering=ordering+1;



Please help!

Thanks!

solved by myself

use this:




$this->model->updateAll(array('ordering'=>new CDbExpression('ordering+2')));



this’s work.


$this->model->updateCounters(array('ordering'=>2));