use or_like with where condition in codeigniter
$this->db->like('body', $body);$this->db->or_like('author', $author);
You can do it like this
$this->db->where('id', $id);
$this->db->where('(`title` LIKE \'%'.$title.'%\' OR `body` LIKE \'%'.$body.'%\' OR `author` LIKE \'%'.$author.'%\')', NULL, FALSE);
Comments
Post a Comment