[eluser]Unknown[/eluser]
I must write this query for search result
SELECT id FROM ref WHERE cat_id='1' AND
(desc_short LIKE '%xxx%' OR desc_long LIKE '%xxx%'
)
I try with
$this->db->where('ref.cat_id', 1);
$this->db->like('ref.desc_short', 'xxx');
$this->db->or_like('ref.desc_long', 'xxx');
but produces wrong code
SELECT id FROM ref WHERE cat_id='1' AND desc_short LIKE '%xxx%' OR desc_long LIKE '%xxx%'
Anyone can help me?