sql - Match Against... SEMI-Literall -



sql - Match Against... SEMI-Literall -

i want match-against query in words of string must necessary in field, needs take 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 prepare this?

thank much

its done...

$search= '+'.str_replace(" ","* +",$_post["searchtext"]).'*';

:d

sql search match against

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -