On search with LIKE
've been working on an app that involves searching the database, im using LIKE, something like:
I found out that LIKE is only good for one-word searches.
"select * from news where headline like '%$search-term%' or content like '%$search-term%' "
--Returns results for good day but not for day good- though good and day exist in the database (but not in that order
and I didnt surround the search term with quotes).
-Also if searched for good day will produce results but search for "good day" will not produce results.Generally, quoted
terms do not produce any results.
How do I break up the search to make the script search for individual words
in the search term in any order of appearance and to search for quoted terms or is there a more professional searh method other than LIKE?
with your front-end application
Originally Posted by tentim
suggest you ask a moderator to move this thread to the appropriate forum (php? asp? java?)