Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter - escaping values before inserting in database - single quotes issue
#1

[eluser]Zigson[/eluser]
I am having issue with inserting value in database. Somehow my value gets wrapped by single quotes. Value is escaped just in order, though.

Sample of value: Test " ' test
Sample of value inserted in db: 'Test \" \' test'

I am using Active Record:

Code:
$data = array(
    'some_value' => $this->db->escape($this->input->post('some_value')),
    ...

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

Any help much appreciated.


Messages In This Thread
CodeIgniter - escaping values before inserting in database - single quotes issue - by El Forum - 10-15-2014, 04:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB