[eluser]paris[/eluser]
hi all,
I have problem using '~' char with active record. I need to use '~' char in where clause for pattern matching. But in the sql string produced by active record, '~' char converted to '-' char.
here my sample model:
Code:
$this->db->select('*');
$this->db->where('term ~*', 'regex');
$query = $this->db->get('search');
$result = $query->result_array();
return $result;
the sql string should be like this:
Code:
SELECT * FROM 'search' WHERE 'term' ~* 'regex';
the sql string produced by active record :
Code:
SELECT * FROM 'search' WHERE 'term' -* 'regex';
anyone could help me?, what did I wrong?
thanks, paris.