[eluser]september28[/eluser]
Sorry if this is really obvious but i have been tearing my hair out trying to figue out what i am doing wrong here...
This is the function in my IdiomSearch_model class
Code:
function search() {
$terms = $this->input->post('searchterms');
$this->db->select('idiom, slug');
$this->db->from('idioms');
$this->db->where('MATCH (idiom) AGAINST ("'.$terms.'")', NULL, FALSE);
$query = $this->db->get();
$result = $query->result();
if($result) {
return $result;
}
return FALSE;
}
Basically I call this from a controller and then just load the result into an the $data['searchresults'] to send to the template. When i submit the search form all i get is an error: Fatal error: Call to a member function result() on a non-object in /var/www/idm/system/application/models/idiomsearch_model.php on line 18
Its driving me crazy please help!
Thanks,
Dan