I know that I can use SELECT * FROM myTable WHERE name MATCH 'andrew OR bill' to find all entries with either Andrew or Bill in them.
SELECT * FROM myTable WHERE name MATCH 'andrew OR bill'
But is there a way I can just use the string 'andrew bill' as a query and get the same result? That is SELECT * FROM myTable WHERE name MATCH *SOME METHOD* 'andrew bill' will return the same as the query above? I need this for my website where users can search for entries in a html input field and requiring all key word to be present is a little too restrictive.
SELECT * FROM myTable WHERE name MATCH *SOME METHOD* 'andrew bill'
I was thinking about replacing all spaces with " OR " but I am hoping for a more elegant, less error prone solution...
1.4m articles
1.4m replys
5 comments
56.9k users