Thank you Marek
"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You first need to separate the words and then build your query:
>
> $words = explode(' ',$S_For);
> $cond='';
> foreach($word as $str) {
> $cond .= " $S_From LIKE '%$s
You first need to separate the words and then build your query:
$words = explode(' ',$S_For);
$cond='';
foreach($word as $str) {
$cond .= " $S_From LIKE '%$str%' AND "; // replace AND with OR if
you want ANY word
}
// remove trailing AND(last 4 chars) or OR(last 3 chars)
$cond = substr($cond,
Hello,
What you need is :
1- parse your query and make it boolean
"apple orange" become "apple and orange" and so on
2- then you can generate a MySQL query based on that like this way
---
SELECT id, field1
match (field1) against (' apple orange ') as relevance
FROM hospitality
WHERE
3 matches
Mail list logo