CodeIgniter Forums

Full Version: Single quotes not being escaped
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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,