logging db actions via model events and id problem |
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 |
Messages In This Thread |
logging db actions via model events and id problem - by dgvirtual - 01-12-2022, 12:55 PM
RE: logging db actions via model events and id problem - by kenjis - 01-12-2022, 07:41 PM
RE: logging db actions via model events and id problem - by dgvirtual - 01-13-2022, 03:36 AM
RE: logging db actions via model events and id problem - by iRedds - 01-13-2022, 11:59 AM
RE: logging db actions via model events and id problem - by MGatner - 01-17-2022, 06:58 AM
RE: logging db actions via model events and id problem - by dgvirtual - 01-19-2022, 12:20 PM
|