CodeIgniter Forums
Single quotes not being escaped - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Single quotes not being escaped (/showthread.php?tid=15296)



Single quotes not being escaped - El Forum - 01-30-2009

[eluser]Unknown[/eluser]
I'm running CI 1.7, php 5 and magic quotes = on,
and not sure why my db inserts are not getting escaped:

$this->db->insert('table', $data);

if I insert a value such as

$title = 'This has single '' quotes ' in it ' ';
$data = array('title' => $title)

The single quotes are not escaped. My understanding was that the
activerecords escaped them for you. Please help,

Thanks