469,898 Members | 2,359 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Query field for underscore string??

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

Sep 2 '06 #1
1 10841
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\_%'
Sep 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Jason Daly | last post: by
3 posts views Thread by John young | last post: by
6 posts views Thread by Martin Lacoste | last post: by
2 posts views Thread by Keith Wilby | last post: by
1 post views Thread by Intrepid_Yellow | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.