CodeIgniter Forums
Profiler not showing all queries - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Profiler not showing all queries (/showthread.php?tid=34594)



Profiler not showing all queries - El Forum - 10-04-2010

[eluser]shelton_dev_guy[/eluser]
How can I make all queries show up in the Profiler whether I redirect() or load->view()?

If I redirect() the page, the queries don't show up in the profiler.


Profiler not showing all queries - El Forum - 10-04-2010

[eluser]WanWizard[/eluser]
Quite obvious, a redirect causes an abort of the current page request and a new page request.


Profiler not showing all queries - El Forum - 10-04-2010

[eluser]shelton_dev_guy[/eluser]
Thanks. Is there a method for saving up the queries if there is a redirect, so I can adjust the Profiler to show those as well as the ones used to make the current page?


Profiler not showing all queries - El Forum - 10-04-2010

[eluser]WanWizard[/eluser]
Not easy, you will have to get the query data from all database objects, save it somewhere (session?), and write it back to the database objects after the redirect. Or extend the profiler to fetch the data from wherever you stored it.