![]() |
$this->db->escape() vs $this->db->escape_str() - 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->escape() vs $this->db->escape_str() (/showthread.php?tid=39529) |
$this->db->escape() vs $this->db->escape_str() - El Forum - 03-13-2011 [eluser]Evollution[/eluser] i dont understand when i shoud use $this->db->escape_str() and when $this->db->escape() what is the diffrence ? $this->db->escape() vs $this->db->escape_str() - El Forum - 03-13-2011 [eluser]Evollution[/eluser] for example my controller Code: function create(){ and my model Code: function add_record($data){ I done it corectly ? $this->db->escape() vs $this->db->escape_str() - El Forum - 03-13-2011 [eluser]guidorossi[/eluser] You don't need to escape the data if you're using Active Record because "All values are escaped automatically producing safer queries." http://ellislab.com/codeigniter/user-guide/database/active_record.html#insert |