Query field for underscore string??

Query field for underscore string??

am 02.09.2006 22:56:43 von B-Dog

I have a field that contains an underscore. How can I do a query for
the underscore since I just found that underscore really doesn't find
underscore it is a wildcard in mysql. I need to be able to query for
the actual underscore. For example. Select Title where Title LIKE
'10_%' doesn't give me what I want.

Results

10_1
100_2
1000_4
10_2
etc..

Looking for Result "10_%"

10_1
10_2
10_3


Thanks

Re: Query field for underscore string??

am 02.09.2006 23:22:42 von Aggro

Barkster wrote:
> I have a field that contains an underscore. How can I do a query for
> the underscore since I just found that underscore really doesn't find
> underscore it is a wildcard in mysql.

You need to escape it

'10\_%'