We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How to Update Multi Record

$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 ?

Have you checked if any validation messages are being returned?

if ($tableLeft->save() === false) {
    foreach ($tableLeft->getMessages() as $message) {
       echo $message->getMessage();
    }
}