0
查詢結果將會是update table1 set id=id+1 where id>=10 and staff_id=$staff_id
。yii2 updateallcounter有2個條件
由於只有一個條件,我可以寫
\common\models\leave\table1::updateAllCounters(['id' => 1], ['>', 'id', 10]);
如何添加其中staff_id=$staff_id?
試過\common\models\leave\table1::updateAllCounters(['id' => 1], ['>', 'id', 10],['staff_id'=>$staff_id]);
卻無濟於事。