Welcome Guest, Not a member yet? Register   Sign In
Display SQL queries/debug
#1

[eluser]jonnyjon[/eluser]
Is there a way to display SQL queries as they are made? Or some kind of similar debug message?

Cake does this really well and I was wondering if CI has got something similar.
#2

[eluser]Michael Wales[/eluser]
Code:
$this->output->enable_profiler(TRUE);
#3

[eluser]soupdragon[/eluser]
and where shoud i use that ?

in the model by the query or in the view ?
#4

[eluser]jonnyjon[/eluser]
You can put it in the constructor of the model, or best in the constructor of the controller. Least thats how I use it.

class Users extends Controller {

function __construct()
{
parent::Controller();
$this->output->enable_profiler(TRUE);
}

}
#5

[eluser]soupdragon[/eluser]
okay done that thanks !




Theme © iAndrew 2016 - Forum software by © MyBB