Welcome Guest, Not a member yet? Register   Sign In
logging db actions via model events and id problem
#5

I’m with iRedds on this: you should either look into database triggers or limit your queries to ID-only updates. Trying to recreate ID-based events for queries involving other fields is going to add a ton of overhead because you will be doing mass reads and writes for every single call.
I have a library that does mostly the same thing you are doing, but it ignores non-ID queries. Feel free to check it out (due for a large update in the next week or so): https://github.com/tattersoftware/codeigniter4-audits
Reply


Messages In This Thread
RE: logging db actions via model events and id problem - by MGatner - 01-17-2022, 06:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB