php - setting default on full text search mysql -
this first time using full text search mysql using innodb. i've read in docs, have option prepend (+) plus sign trim result more.
my question can have default searching automatically prepend + when user entered word/s.
eg. user entered following:
- one 2 => (no + sign) result +one +two
- elliot wizard => (no + sign) result +elliot +wizard
in mysql search words containing + though user didn't include +.
ps: searched first in internet , did't find article has solution this..
please help.
regards,
you can achieve this:
<?php $string = 'this string'; $stringwithplus = '+'.implode('+',explode(' ',$string)); echo $stringwithplus; ?>
Comments
Post a Comment