DB Insert Timing |
(01-16-2023, 09:03 PM)kenjis Wrote: Check your real SQL statements with Debug Toolbar or DB Server log. Code: INSERT INTO `auction_lots_versions` (`parent_id`, `created_at`, `createdby_id`) Ok that tells me what is going on. CI is overriding and putting the 'created_at' in there, rather than allowing MariaDB to do it as I thought it was doing. I remember reading something about that in the docs. Off to find it! Thanks Kenjis you are always so helpful!! I very much appreciate it! So looking at my Model, I see I included the "created_at" field in the allowed fields. Simply removing this solves the issue and allows MariaDB to set the timestamps. PHP Code: namespace App\Models; Quote:Since I don't specify the field, shouldn't it NOT set the timestamp?Quote:$createdField |
Messages In This Thread |
DB Insert Timing - by SoccerGuy3 - 01-16-2023, 03:59 PM
RE: DB Insert Timing - by kenjis - 01-16-2023, 04:49 PM
RE: DB Insert Timing - by SoccerGuy3 - 01-16-2023, 04:59 PM
RE: DB Insert Timing - by kenjis - 01-16-2023, 05:20 PM
RE: DB Insert Timing - by SoccerGuy3 - 01-16-2023, 05:26 PM
RE: DB Insert Timing - by kenjis - 01-16-2023, 09:03 PM
RE: DB Insert Timing - by SoccerGuy3 - 01-17-2023, 10:58 AM
RE: DB Insert Timing - by kenjis - 01-17-2023, 06:37 PM
RE: DB Insert Timing - by SoccerGuy3 - 01-18-2023, 07:33 AM
RE: DB Insert Timing - by InsiteFX - 01-18-2023, 12:22 AM
RE: DB Insert Timing - by kenjis - 01-18-2023, 06:04 PM
RE: DB Insert Timing - by SoccerGuy3 - 01-27-2023, 11:02 AM
|