How do I update or keep a specific field only in CakePHP 3.0?

I want to update or save a specific table field in Cakephp 3.0. I tried "Refreshing Data" from Cakebook and saved the data, but the problem is that it also saves the changed field assigned as datetime in the database. In this case, I do not want to save this field. How to do it?

Thank you in advance

+3


source to share


1 answer


If you don't want the callers to be called, just use updateAll()



$table->updateAll(['field' => $newValue], ['id' => $entityId]);

      

+7


source







All Articles