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

Thank you @MGatner  and @iRedds. After thinking through this I decided that fixing my code is a cheaper option. First, I have found a lot of stupid code like
Code:
$watchesModel->where('id', $id)->set($data)->update();
That was easy to fix. Then, in some places the id of the entry was available in the code, just I happened not to use it in the query. I easily fixed those lines.
True, in some places I found I had to do a query first to get the id, but well, that was not so difficult after all.
And in some cases, where a query would update multiple rows at once, I decided logging those was not that critical after all. ) Angel
If anyone were interested, I could paste here the complete solution I am using now.
Thanks guys for help!
==

Donatas G.
Reply


Messages In This Thread
RE: logging db actions via model events and id problem - by dgvirtual - 01-19-2022, 12:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB