updated_at is not updating |
08-19-2021, 10:28 AM
(This post was last modified: 08-19-2021, 10:38 AM by wdeda. Edit Reason: Justification for two Models. )
The update of created_at and/or updated_at is completely random, both in option 1 and option 2, I gave up on understanding why sometimes it happens and sometimes it doesn't, and when it happens, according to my point of view, it's kind of meaningless, this is, updates created_at and update_at simultaneously with the same data. I think update_at should only be updated when an update actually occurs.
The solution I found was both in creating new tables and in existing tables using the following settings: Code: created_at DATETIME NULL DEFAULT CURRENT_TIMESTAMP, @craig I don't agree. I use "two types" of Model: 1 - for queries, query builder; I don't use find or find all; PHP Code: <?php 2 - for updating tables, inserting data. PHP Code: <?php Of course I could do it in a single Model but as what I have is a private site, only local, I have a second site dedicated only to table updates, 28 in total, and other support services, etc. |
Messages In This Thread |
updated_at is not updating - by nneves - 08-18-2021, 04:50 PM
RE: updated_at is not updating - by InsiteFX - 08-19-2021, 01:34 AM
RE: updated_at is not updating - by nneves - 08-19-2021, 02:21 AM
RE: updated_at is not updating - by ikesela - 08-19-2021, 04:12 AM
RE: updated_at is not updating - by nfaiz - 08-19-2021, 04:59 AM
RE: updated_at is not updating - by nneves - 08-19-2021, 05:25 AM
RE: updated_at is not updating - by ikesela - 08-19-2021, 12:12 PM
RE: updated_at is not updating - by craig - 08-19-2021, 07:52 AM
RE: updated_at is not updating - by wdeda - 08-19-2021, 10:28 AM
RE: updated_at is not updating - by nneves - 08-19-2021, 01:43 PM
RE: updated_at is not updating - by InsiteFX - 08-20-2021, 01:27 AM
RE: updated_at is not updating - by paliz - 08-20-2021, 05:38 AM
|