Welcome Guest, Not a member yet? Register   Sign In
Active Record: viewing the resulting queries?
#1

[eluser]degu[/eluser]
Hello,

is there a way to view/log the queries that the active record methods build? I need to analyze some of my more complex queries for debugging purposes. Thanks!
#2

[eluser]simshaun[/eluser]
Try enabling the profiler. It should show the queries at the bottom.
#3

[eluser]fesweb[/eluser]
To be more specific for new people...

At the top of your function (or inside the controller's __construct() function):
Code:
$this->output->enable_profiler();
#4

[eluser]Armchair Samurai[/eluser]
You can also echo out the query with $this->db->last_query()




Theme © iAndrew 2016 - Forum software by © MyBB