![]() |
$this->db->lastquery() not working - 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: $this->db->lastquery() not working (/showthread.php?tid=37167) Pages:
1
2
|
$this->db->lastquery() not working - El Forum - 06-17-2011 [eluser]searain[/eluser] Hi, did you figure out what is the problem? I have the same issue now. echo $this->db->last_query(); Just return nothing but the query was successful. $this->db->lastquery() not working - El Forum - 06-17-2011 [eluser]InsiteFX[/eluser] Change the name of your Model to like Some_model! InsiteFX $this->db->lastquery() not working - El Forum - 06-17-2011 [eluser]searain[/eluser] found out my problem. My database default set up set $db['default']['save_queries'] = FALSE; Because queries are not saved, so last_query won't return anything. I need to add this line before the query to get $this->db->last_query(); $this->db->save_queries = true; |