I use $orders =Orders::find () and get one Resultset object: $orders. I loop it like this and I try to update the $order object. $orders->rewind(); while ($orders->valid()) { $order= $orders->current(); echo $order->code, "\n"; $order->code = "xx"; $orders->next(); }
But it didn't take effect. Anyone who can tell me how can I do that? Thanks in advance.