Subject: Update multiple rows
Hi, I have a simple question: Is there any chance to update multiple rows in Active Records by like that:
$images = Galleries::all([ 'conditions' => [ 'articles_id IS NULL AND users_id = ?', Kernel::$app->auth->user->id ] ]) $images->articles_id = $article->id; $images->save();
or there is only method like that:
Galleries::update_all([ 'set' => [ 'articles_id' => $article->id ], 'conditions' => [ 'articles_id IS NULL AND users_id = ?', Kernel::$app->auth->user->id ] ]);
June 27 2010
April 16, 2013
Subject: Update multiple rows
Hi,
I have a simple question:
Is there any chance to update multiple rows in Active Records by like that:
or there is only method like that:
Best cheers!