[eluser]gtech[/eluser]
I think you use $this->db->set and the third parameter FALSE stop CI escaping the value.
Code:
$this->db->set('field', 'value', FALSE);
$this->db->insert('mytable');
Quote:The CI documentation
set() will also accept an optional third parameter ($escape), that will prevent data from being escaped if set to FALSE. To illustrate the difference, here is set() used both with and without the escape parameter.
$this->db->set('field', 'field+1', FALSE);
$this->db->insert('mytable');
// gives INSERT INTO mytable (field) VALUES (field+1)
$this->db->set('field', 'field+1');
$this->db->insert('mytable');
// gives INSERT INTO mytable (field) VALUES ('field+1')
hope that resolves your problem.