So I'm trying to write a simple search script for MySQL. I want to match all of the words in the search string in order to return a result. The options I've tried are thus:
1) MATCH description AGAINST ('searchterm1 searchterm2')
This matches results with any of the search terms.
2) description LIKE ('%searchterm1%' AND '%searchterm2%')
This works but in order for any stopwords to work I'd have to add them all manually. I'm trying to avoid writing that kind of code if I can do it automatically. (a search for "the" returns every entry in the db!)
3) MATCH description AGAINST ('+searchterm1 +searchterm2' IN BOOLEAN MODE)
This would do exactly what I want (i think) but the version of mySQL installed on the server I have to work with doesn't yet support the IN BOOLEAN MODE part. It's a hosting service and I'm at their mercy when it comes to the version of MySQL.
Any ideas, or do I just need to write the stopwords and such all manually? Any help would be greatly appreciated! Thanks in advance.
Lucas