When migrating, I want to add an order column that defaults to the column id. I tried the following:
$this->update(
'item',
array(
'item_order'=>':item_id'
),
'',
array(
':item_id'=>'item_id'
)
);
But that just gives all ID 0. (I'm not very surprised, since I assume it is trying to use a row as opposed to a column name).
Any way to do this without manually building SQL?
source
share