Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] RE: How to prevent auto-update of $createdField and $updatedField
#1
Wink 
(This post was last modified: 06-06-2021, 09:20 AM by BlackBones.)

Hello guys.
I am using CI4 (auto) Model.
I want to prevent auto-update of created_at and updated_at in my database table so I can set the values manually. The problem is for example, the 'created_at' and 'updated_at' fields are both updated with the current timestamp, and in so doing, the original date and time a user registers an account is changed, and my application loses track of the original timestamp.
I have followed the documentation about $useTimestamps, $createdField, $updatedField exactly...even leaving both $createdField and $updatedField empty (as instructed in the documentation) and I'm still not able to prevent the auto-update.
Any help anyone please?
Thanks ahead!
Heart Heart Heart
Reply


Messages In This Thread
[SOLVED] RE: How to prevent auto-update of $createdField and $updatedField - by BlackBones - 06-06-2021, 03:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB