On Saturday, March 29, 2003, at 07:41 AM, Trevor Smith wrote:
2. your syntax just seems wrong. This should be:
SELECT * FROM MyTable WHERE NeedleColumn LIKE '%needle%';
to search for the string 'needle' anywhere in NeedleColumn, if that's
what you were looking for.
I'm jumping in mid-stream so
I am having the same problem.
This Query:
SELECT 'haystack needle haystack' LIKE concat('%', 'needle', '%')
returns 1
However, this query does not work correctly If you generalize is to
include a database column:
SELECT * FROM MyTable WHERE 'haystack needle haystack' LIKE CONCAT('%',
NeedleC