Without getting too fancy, I want to be able to take a query string like you might enter into a search engine and convert it to a mysql query string.
For example, if we're querying the field 'contents' :
cars cows fish -- returns rows where contents has either %cars%, %cows% or %fish% in it
"cars" cows fish -- rows that have cars, %cows% or %fish%
+cars cows fish -- rows that have %cars% AND cows or fish
+cars -cows fish -- must have %cars%, mustn't have %cows%, may have %fish%
"cars cows fish" -- rows that have the phrase 'cars cows fish'
... or any combinations.
I want a function thus:
To the function we'll pass the $query_string and the field we're querying on - e.g.
.. the function will return something like:
(contents like '%cars%' AND contents like '%cows%')
.. for us to then use in our calling function.
As a small extra, remove any nasty looking characters from the string before processing it (e.g. *'s, ?'s etc)
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).
Linux / PHP / Apache / MySQL