![]() |
serch engine in my own webiste using code igniter - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: serch engine in my own webiste using code igniter (/showthread.php?tid=54849) |
serch engine in my own webiste using code igniter - El Forum - 09-27-2012 [eluser]Unknown[/eluser] I have a site made using code igniter and now i have to give a function of seach in my website that serches through keyword given by user through input text field. Is there any concept of how i make this possible? I have read about php search script Sphider.I like it but don't know how to integrate it within my website.So can anyone help me. Thanks serch engine in my own webiste using code igniter - El Forum - 09-28-2012 [eluser]srpurdy[/eluser] This just depends on what you want to do with it, and how much options you want. For example really basic example: Code needed for controller method. Code: $this->load->model('search_model'); model method do_search Code: function do_search($terms) View - just foreach the result from above. Code: <?php foreach($do_search->result() as $ds):?> Of course you might want to put some limitations like a min amount of characters at least. This is about as simple as it gets. You can pretty easily build on it though. ![]() And also which fields in your db you actually want to search through. ![]() |