on-internet
← Community

Fulltext search query not working in CodeIgniter

Stack Overflow ·

I'm trying to run a fulltext index search in CodeIgniter. My search function looks like this: public function get_searchresult_count($searchresult) { $today_date = date('Y-m-d'); $db_photos = $this->load->database('photos', TRUE); $db_photos->select('*'); $db_photos->from('photos'); $db_photos->where('MATCH (`title`, `description`) AGAINST ("'.$searchresult.'")', NULL); $db_photos->where('approved', '1'); return $db_photos->count_all_results(); } I need the return to be count_all_results because it needs to get a number for the pagination of the results. I can't get it working, I get this erro

Comments

Sign in or sign up to comment and upvote.

No comments yet.