Can any authority indicate how to save and update the database table using the save function of the model without changing the created and modified fields in cakephp 2 ..
created
modified
If you do not want to update the field changed while saving some data, add
'modified' => false
to the array $ data p>
Link: Saving Data
Hope this helps
Example:
$this->request->data['YourModel']['modified'] = false;
The documentation states that setting 'modified' to false will save the modified date. However, I found that this causes the Save call to fail without any indication of what is wrong. Using unset in a modified value seems to work.
unset( $this->request->data['YourModel']['modified'] );
Documentation: http://book.cakephp.org/2.0/en/models/saving-your-data.html#model-save-array-data-null-boolean-validate-true-array-fieldlist-array
Source: https://habr.com/ru/post/1391811/More articles:sessionStorage in Firefox - javascriptHow can I add Calendar (Global) to a textbox click event? - asp.netAppEngine: using the Expando class in Django NonRel? - google-app-engineInsertion of record in two tables? On the Sql server? - sql-server-2008How can I sort a JSON array? - jsonConvert source class object to specific class object - javaFaster implementation for Math.abs (ab) - Math.abs (cd)? - javaWhat is the Dojo 1.6-equivalent jQuery (html)? - jqueryFailed to load PDF attachment using java using JavaMail - javaSubclass UIViewController or create a custom NSObject if the view is not full-screen - iosAll Articles