CodeIgniter Forums
active record SQL text - 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: active record SQL text (/showthread.php?tid=6338)



active record SQL text - El Forum - 02-22-2008

[eluser]sawatdee[/eluser]
Is there a way to get the actual SQL produced by active record calls such as the insert function?


active record SQL text - El Forum - 02-22-2008

[eluser]ScottBruin[/eluser]
See manual, especially $this->db->last_query() and $this->db->insert_string().


active record SQL text - El Forum - 02-23-2008

[eluser]Derek Allard[/eluser]
Thanks Scott. Man, I live with last_query(). I keep a copy of
Code:
echo '<p>'.$this->db->last_query();.'</p>';
on my clipboard at all times Smile