Welcome Guest, Not a member yet? Register   Sign In
DB Insert Timing
#1

Ran into something strange today. Running CI4.2.11 with PHP 8.025
I have a process setup that takes some input, does an insert into the database, opens a dialog box which is a confirmation, takes that click, then 2 searches are run and then another insert is run. All works great, except according to the timestamp in MariaDB, both inserts take place at the exact same time - down to 6 decimal places! I tried inserting a "usleep(150000)" before the second insert, but it didn't make any difference (actually not sure it is even being recognized/executed).
Time of first insert: 2023-01-16 14:48:41.920000
Time of second insert: 2023-01-16 14:48:41.920000
Because of this, attempting to find the most recent record is failing (well, actually it is returning BOTH records).
Is CI holding the connection open and then MariaDB uses the time the connection was opened for the timestamp or something?
Help!
Smile
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB