CodeIgniter Forums
Site Search using CI - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Site Search using CI (/thread-11489.html)



Site Search using CI - El Forum - 09-10-2008

[eluser]codelearn[/eluser]
Hey all,

I am trying to build search capability for a certain feature on my site.

There is a business directory, and I'd like to add the ability for users to search the directory for a certain store. Obviously the point would be to not force the user to match a name exactly, and "close" querys would return the correct result.

Where would be a good place to start?

Thanks!


Site Search using CI - El Forum - 09-10-2008

[eluser]NateL[/eluser]
>:-( Where was this website when I was in college? I really needed it. :-P

aside from that... x2 on your need for a search. I was going to start a new thread on the same topic one of these days Smile


Site Search using CI - El Forum - 09-10-2008

[eluser]phantom-a[/eluser]
You want to search the database using the "like" method.

Maby this tutorial might help you. It follow what your after, maby not exactly what you need but it covers a bit about it.
http://video.derekallard.com/application

But if your allowing user to search the database with like method your best off to put a limiti on characters, some searches put a limit of 3 characters or else they could 1 letter like "a" and hit search and it will pull out the whole part of your database you told it search in. :-)