I know codeigniter automatically escape characters to prevent possible sql injections. But how would I able to store string value in the database with double quotes on it. Is this possible? Or is there a function or condition that can ignore double quotes and still store it in the database using codeigniter active records? I have tried to store a double quoted value in the database but it fails to store the value. E.g. I want to store this value "Computer Course" in the database using the variable $course_desc but the description field in my database stores nothing.How would I able to do this? Here is my model active record code for inserting values:
Model:
public function insert_file($filename,$course_name,$course_desc,$tennant_email,$is_public,$concat_url)
{
$data = array(
'course_id' => '',
'tennant_id' => $tennant_email,
'display_public'=> $is_public,
'course_name' => $course_name,
'course_desc' => $course_desc,
'private_url' => $concat_url,
'filename' => $filename
);
$this->db->insert('courses', $data);
return true;
}