I'm trying to search for multiple words. I already, tried adding FULLTEXT to my database schema.
This is the code I have now, and only one word returns results.
$term = $this->input->post('term');
$this->db->like('firstname', $term);
$this->db->or_like('lastname', $term);
$this->db->or_like('middlename', $term);
$query = $this->db->get('people');
$data['people'] = $query->result();
$this->load->view('people', $data);
Searching for one word like "John" or "Doe" or "Smith" works.
But when I try searching for "John Doe" or "John Doe Smith" it won't return any results.
How can I achive multiple words search by using CodeIgniter's Active Record or a "$this->get->query".