troubleshooting queries |
[eluser]mrtopher[/eluser]
Is there a function in the database class that I can call to see the generated SQL output to the screen instead of having it processed?
[eluser]xwero[/eluser]
I think that would be a problem because the action methods (get,insert,update,delete) have the final methods for building the query or you should add the methods view_get, view_insert, view_update and view_delete to the AR library Code: function view_get($table = '', $limit = null, $offset = null)
[eluser]tonanbarbarian[/eluser]
if you turn on the profiler it will show you the queries that were run, except of course if you redirect Enable Profiler
[eluser]John Fuller[/eluser]
But if the SQL is not processed then there is no output. Wow, that is deep. Kind of like, what comes first, the chicken or the egg? My brain hurts.
[eluser]xwero[/eluser]
As i understand mrthopers question correctly he doesn't want to execute the queries so enabling the profiler is no option. Maybe an easier solution would be having a variable in the AR library that can be set before building the sql statement because the only difference with the view_ methods and the regular methods is the return of the compiled statement and the execution of the statement Code: var $view_sql = false; Code: $this->db->view_sql = true; |
Welcome Guest, Not a member yet? Register Sign In |