Im attempting to allow someone to search the user table for records containing information they enter.. the idea is they start of by entering a name "Joe" which should match all "Joe" in the fields, their first, last and address and so on.. they then refine the search to "Joe Smith" which is to match "Joe" AND "Smith" anywhere with the row, ie "name=joe, surname=smith" "surname=joe and address=smith" and so on. but ALL words must exist in some order at least once..
i can do a regexp for OR "joe|smith" being matching if it contains either joe or smith anywhere, but that is not refining the search results, rather increasing the search results. is there a way to do this in regexp? someone in irc saying that IS LIKE "joe" AND IS LIKE "smith" but that will become a huge sql statement (like this post) if its got loads of words "a b c d ..."
Please help me...