SQL LIKE Function Help

Hello

in a mysql table there is a piece of data under POSITIONS column ‘TECHNICAL ASSISTANT (ENVIRONMENTAL)’

i have a piece of string ‘MANAGER ENVIRONMENTAL ENGINEERING’.
i want a query when issued, this string should match the above.

currently i am using the below query.

SELECT * FROM TABLENAME
WHERE POSITIONS LIKE '%MANAGER ENVIRONMENTAL ENGINEERING%'
OR   POSITIONS LIKE '%MANAGER ENVIRONMENTAL ENGINEERING'
OR POSITIONS LIKE 'MANAGER ENVIRONMENTAL ENGINEERING%'

But it’s not matching. Please help :rolleyes:

you have to break down the search string into individual words (using your application language, php or whatever)


WHERE positions LIKE '%manager%'
   OR positions LIKE '%environmental%'
   OR positions LIKE '%engineering%'

:smiley: :stuck_out_tongue:

Thank you r937!
btw, my language is php, ill explode the words and feed to the query then.