Regex to Match word in brackets with mysql and keyword -


i'm having problems matching word or group of words in mysql query.

for example. in database have sentences like: (just example...)

  1. john fast.
  2. sussy [fast].
  3. peter tied jim first place.
  4. jim tied peter [first] place.

    $_query = $_link->prepare("select sql_calc_found_rows * tblpeople `text` regexp concat('[[:<:]]',:keyword,'[[:>:]]') limit :start,:count"); 

so user enters search term this:

"was fast" or "for first" 

and results #1 first search or #3 second search.

however want query match words inside brackets, searching was fast match #1 , 2, , searching for first match #3 , #4.

any appreciated.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -