According to historical records, on Wed, 21 Apr 2004 12:28:27 +0300 Phpu wrote about "[PHP] A good search tutorial ":
>Hi there >I have a site driven by a database and I need a search engine...when someone enter a >word the script to search the entire database for that word and return the results. >Could someone give me the link to that kind of tutorial? >Please email me asap I'd say it largely depends on what kinda data you're searching in, and how you want it displayed ... The search engine I wrote for the CPU database on my site (http://metalbunny.net/computers/cpudb.php) does wildcard/free searching in 3 fields in the one table in the database simultaneously, and allows for selective reduction of the result set and custom sorting of all the 12 columns it displays. (thanks alot btw to everyone on this list and PHP DB that helped me make this!). It's a few hundred lines long because of the many options... My point with mentioning this is merely that depending on how complex data you want to search in, and how flexible you want to make the search option ... and how you want to display the results of the search, the method of and approach to building the search engine differs ... The code Brent posted is the basic start for the SQL string for the search engine ... you need to find out what you want it to be able to do and build it from there ... I don't know if my code would help you any bit ... but I'd gladly post it upon request .... it's just that it's made when I was still a rookie at SQL, so it's not very elegant, and not very well commented ... and looking at it now I can find several ways to improve it ...just don't have the time for it... FWIW Rene -- Rene Brehmer aka Metalbunny ~ If you don't like what I have to say ... don't read it ~ http://metalbunny.net/ References, tools, and other useful stuff... Check out the new Metalbunny forums @ http://forums.metalbunny.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php