Reputation: 706
I am working on codeigniter 3.0 and need to print all queries in page. I used this
$this->output->enable_profiler(TRUE);
But its not working its showing only SELECT queries.
Even I tried with HOOK but its still printing SELECT queries in log file. Can anyone please help me ?
Upvotes: 4
Views: 1299
Reputation: 2025
Please add this line and check after the class definition.
public function __construct()
{
parent::__construct();
$this->db->save_queries = TRUE; //It is used for profiler query
}
Upvotes: 0
Reputation: 57
Seems like your INSERT queries are processed after the profiler is processed. Perhaps you're using AJAX? What log files? I haven't used them for CodeIgniter specifically. If using AJAX, the CodeIgniter framework might not catch certain queries when we expect them.
I'm assuming the INSERT queries are being being executed, but if they're not, then I would check that first.
Upvotes: 0