Codeigniter escape_str() function
This function will escape all data, regardless of type.
$sql = " INSERT INTO table (name) VALUES(" . $this->db->escape_str( $name) . " ) " ; $this->db- >query($sql) ;
This function will escape all data, regardless of type.
$sql = " INSERT INTO table (name) VALUES(" . $this->db->escape_str( $name) . " ) " ; $this->db- >query($sql) ;