sql - Match Against... SEMI-Literall -
i want match-against query in words of string must necessary in field, needs accept mistakes or words uncomplete.
my actual script this:
$search= '+'.str_replace(" ","% +",$_post["searchtext"]);
with convert "this text" "+this +is +my +text" words necessary in search, , make
$query = $dbh->prepare("select name,surname match (name,surname) against (:search in boolean mode) coincidences users match (name,surname) against (:search2 in boolean mode) order coincidences"); $query->execute(array('search' => $search,'search2' => $search));
the problem if in db there "stephen hawking" , search "stephen hawk" wont appear... how can fix this?
thank much
its done...
$search= '+'.str_replace(" ","* +",$_post["searchtext"]).'*';
:d