codeigniter 3.0 like query add ESCAPE '!'
example:
$this->db->select('*');
$this->db->from('sample');
$this->db->like('col','val%val2');
$this->db->get()->result_array();
CI produces the query like following
SELECT * FROM `sample` WHERE `col` LIKE '%val!%val2%' ESCAPE '!'
But I expected it
SELECT * FROM `sample` WHERE `col` LIKE '%val%val2%'
How can I achieve that?
AT CI-2 it produce the result as expected.But CI-3 Producing result as you said.May be it should be improve.
After some research I found solution where you need to set some config inside
system/database/DB_driver.php
Open the the DB_driver.php go to line 340 and 347. You will find like this
Change them to empty like following