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...)
john fast.sussy [fast].peter tied jim first place.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
Post a Comment