[eluser]woopsicle[/eluser]
hi all,
when i enable the profiler, the output (at the bottom of the page) shows each query on the page twice.
eg.
query 1
query 2
query 3
query 1
query 2
query 4
it is not affecting my view files.. and all the data being output in the view files is correct. just wondering if i should be worried about this? ... obviously if the queries ARE running twice then it will make my page generation times a bit slower - but i am not sure if this is a bug with the profiler class or with my code!
i have tried debugging but am unable to figure out why this is happening. have tried not using models (just putting the queries in the controller), having a blank view file (i.e. not doing anything with the query data) but it still persists.
any ideas? i have made other CI sites and I cannot remember this happening before... but I can't think of anything which I have done/setup differently for this site.
model eg:
Code:
function getSiteStats()
{
$this->db->select(" num_members,
num_emails,
num_attachments,
num_votes");
$this->db->from("site_stats");
return $this->db->get();
}
controller eg:
Code:
//site stats
$this->load->model('Stats_Model', 'sql_stats', TRUE);
$this->data['stats'] = $this->sql_stats->getSiteStats();