Sure,
(but the following is not in strict PHP)....
Assume search string has words with spaces in between
$snippet = "";
$prev_word = false;
$words_array = explode(" ",$search_string);
for each element in $words_array as $w
{
if($w = "on" or "and")
{
if($prev_word)
{
$snippet .= " ".$w." ";
$prev_word = false;
}
}
else
{
if($prev_word)
{
$snippet .= " OR ";
}
$snippet .= " field1 like '%".$w."%' ";
$prev_word = true;
}
}
The above is only pseudo-PHP but the basic idea is to take the search term a word at a time.
The trick is to allow for search strings like
"OR HOTEL"
"HOTEL OR RESTARAUNT"
"HOTEL RESTARAUNT"
The above code (if it works) should allow for all of these and will result in the variable $snippet having the clause needed for that field you should then surround it with parenthesis when appending to the search string.
This is a candidate for a function rather than coding in place for each field.
Hope that this helps.