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.'%\')'NULLFALSE);

Comments

Popular posts from this blog

Enable the imap in support in xampp server