$this->db->like('title', 'match', 'before');
// Produces: WHERE title LIKE '%match'
$this->db->like('title', 'match', 'after');
// Produces: WHERE title LIKE 'match%'
$this->db->like('title', 'match', 'both');
// Produces: WHERE title LIKE '%match%'
source:
- https://stackoverflow.com/questions/16226906/codeigniter-like-with-wildcard
- https://stackoverflow.com/questions/44585478/search-query-in-codeigniter