Forum Moderators: open
To clarify, I want to prevent any rows from being displayed if the query is looking for "bar" and the description has the word "barcode".
Thanks.
SELECT *
FROM `table`
WHERE `description` LIKE '%bar%'
AND `description` REGEXP '[[:<:]]bar[[:>:]]';
This should match 'bar' without matching 'barcode'.
REGEXP Documentation: [dev.mysql.com...]