$tableLeft = new Nested();
// Update left
$dataLeft = $tableLeft->find("pleft > 2");
foreach($dataLeft as $row){
if(!empty($row->pleft)){
$pleft = $row->pleft + 2;
$tableLeft->assign(array(
'pleft' => $pleft,
));
$tableLeft->save();
}
}
Not work , my columns "pleft" not plus 2 . And nothing happened . I want update multi record with conditions ( "pleft" > 2 ) . and get current value record plus 2 and update it . So what i can do now ?