To do this, you need to separate the terms out, and call them as individual lines.
It's a pain in the -ss, but I know of no other way to do that.
Try using strpos and substr to break the input string down variables. I'd use an array to store the stripped-out words, so that you can use variable-sized queries.
Yeah, you're looking at a good, full, few pages of code to do it right, and have enough error-checking to make it reliable.
Here's some pseudo-code that might make it clear what I'm saying:
This is NOT USABLE CODE !!! It merely conveys flow control for how I'd approach this problem:
terms we want to search either/or for:
$input="mickey mouse";
#break the phrase into words:
$i=o;
do {
$word[$i]=substr($input, $i, strpos($input, " ");
$i=$i+strpos($input, " ");
} while $i < sizeof($input)
$query="select * from table where ";
for ($i=0; $i < sizeof($words); $i++)
{
$query=$query." field like '%$words[$i]%' ";
}
$result=db_exec($query);
$result would have what you seek.
-Ben