CodeIgniter Search engine not working correct - Get ONLY published posts [duplicate]
I’d like some help please. I have a table iin my database named posts, where I’d like to create a search engine functionality. Here are the basic fields for this: table: Posts post_id (pk) title keywords visible // **** this is the critical point **** I have created also this method in my post_model: public function search() { $this->db->select('post_id, title, etc etc ...'); // separate the words $words = preg_split('/[\s]+/', htmlentities((trim($this->input->post('search')))) ) ; // set fields that you wish to search $search_fields = array('title', 'keywords'); // build the query foreach ($w
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.