mysql like syntax with backslash
Posted: Thu Mar 04, 2010 4:38 pm
Hi,
I have a database table name "test" with one field name "fname" and in that table I have an entry "abc\123". I tried running the queries below and got no result.
select * from test where fname like '%abc\123%'
or
select * from test where fname like '%abc\\123%'
I'm not sure if the mysql like syntax have any problem with backslashes but is there a way to get around this?
I have a database table name "test" with one field name "fname" and in that table I have an entry "abc\123". I tried running the queries below and got no result.
select * from test where fname like '%abc\123%'
or
select * from test where fname like '%abc\\123%'
I'm not sure if the mysql like syntax have any problem with backslashes but is there a way to get around this?