On Sun, 21 Oct 2007 03:58:01 -0700, damezumari wrote:
> With the where condition
>
> like '%hell%'
>
> records with 'hello', 'shell', etc will be returned in addition to
> records where 'hell' is found as a word by itself.
>
> How do I write a condition that will ONLY return records where 'hell'
> is found as a word by itself?
WHERE my_column REGEXP '[[:<:]]hell[[:>:]]';
http://dev.mysql.com/doc/refman/5.0/en/regexp.html
--
17. When I employ people as advisors, I will occasionally listen to their
advice.
--Peter Anspach's list of things to do as an Evil Overlord