gdang
(Gianluca Pericoli)
1
don’t work because don’t bind the :pos param and return one error from the query
Section::model()->updateCounters(
array('position'=>-1),
array('condition' => 'position > :pos'),
array(':pos' => $position)
);
this one work but i don’t bind nothing
Section::model()->updateCounters(
array('position'=>-1),
array('condition' => 'position > '.$position),
array()
);
In the first one I do some errors?
Thanks.
Keith
(Kburton)
2
I shouldn’t think it would make any difference, but try
Section::model()->updateCounters(
array('position'=>-1),
array(
'condition'=>'position > :pos',
'params'=>array(':pos'=>$position),
)
);
kiran123
(Sharmakiran71)
3
I think suggested code by “Keith” will work… 
gdang
(Gianluca Pericoli)
4
it works, thank you very much!