logging all user actions |
(09-01-2020, 01:11 PM)Goddard Wrote: I am using CI 3. I want to log all users insert, update, and delete to a specific table in my database. Can I easily do this using MY_Model, or some other way? You can do this with hooks - you need "post_controller" hook. In your hook method you just need to do: PHP Code: $CI =& get_instance(); // use codeigniter functions "$CI->db->queries" contains an array of all executed db queries when controller was processed. You can also get executing time of all queries with "$CI->db->query_times" |
Welcome Guest, Not a member yet? Register Sign In |