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

Popular posts from this blog

c++ - list<myClass<int> * > sort -

SoapUI on windows 10 - high DPI/4K scaling issue -

java - why am i getting a "cannot resolve method" error on getApplication? -