I need to create a feature that allows users to enter certain words that can
be searched ie
search = 'red lion'
this would return all data found with the words red and lion.
If you're using MySQL 4.0, you can take advantage of its FULL TEXT searching (it's actually available in earlier versions but much better in MySQL 4). See the MySQL manual for more information.
Otherwise, you'll need to parse the search box data to break it up into individual words, then create a query like...
WHERE column LIKE '%$var1%' AND column LIKE '%var2%%'...
This will be slow, so make sure your database uses indexes.
Again, see the MySQL manual for more.
Larry
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php