How do I code a MySQL search query with multiple terms that could be in any arbitratry order?
For example this is the very simple format I'm currently using
WHERE terms LIKE '%$search_terms%'
If I have an item called "Kings Schools Flight Test DVD", if I enter "Kings schools" into the search box, it shows up. But if I type "Kings flight test" it doesn't because of the way the LIKE wildcard works.
Any idea how to code the search query so that it takes into account all the term but regardless of the order or composition of the terms? I know I can explode the terms into an array and then break it up into multiple OR WHERE conditions but how would I sort it by relevance this way?