You might try this article on devshed on how to create a search engine using
MySql and php.
http://www.devshed.com/Server_Side/PHP/Search_Engine/
I currently use this same Technique to run our classifieds at
http://www.chieftainclassifieds.com
Thank you
Brian Paulson
Sr. Web Developer
[EMAIL
Note that a LIKE query like that is going to be very slow. You are
better off defining those fields as fulltext fields and using MySQL's
built-in fulltext search capability which will automatically return a
relevance value for each hit.
See http://www.mysql.com/doc/F/u/Fulltext_Search.html
Try "MATCH (FULLTEXT index columns) AGAINST ('keyword')"
Check the MySQL manual at: http://www.mysql.com and search for "match
against" or "fulltext"
You need to build FULLTEXT indexes on the columns you want to search
before you can use the above syntax.
However, it will search and sort by
However, note that MySQL does not include stopwords in the FULLTEXT index
--and it currently considers any word of three characters or less to be a
"stopword". So if you really are searching for words as short as "cat",
this isn't the solution (or else you're going to need to make some
4 matches
Mail list logo