Database query logger |
Support for logging of queries
Something like this: https://github.com/rebizu/CodeIgniter/co......develop
The queries are already stored by the database system in $db->queries. You could always create a MY_Model that overrode the common methods and handled logging for you after each query. Probably easiest done using the $db->last_query() method.
(11-07-2014, 12:15 PM)kilishan Wrote: The queries are already stored by the database system in $db->queries. You could always create a MY_Model that overrode the common methods and handled logging for you after each query. Probably easiest done using the $db->last_query() method. Debugging is an essential part of developing, adding that kind of code each time, to debug the SQL queries feels ridiculous to me.
I wasn't saying it wouldn't happen in the future, just trying to provide a way that you can do that now. And if you create a thorough MY_Model with the logging built in you don't have to do it every time.
The biggest issue I could see with it as a default is the extra performance hit, but it's always something to consider. |
Welcome Guest, Not a member yet? Register Sign In |