mysql_query and LIKE '[a-z]%' not working?
Posted: Wed Nov 24, 2010 9:28 pm
heres the line:
the query should return all names starting with characters a-m and sort in asc order right? But for some reason I get no records returned.
If I change [a-m]% to just a% it works for all a records, so it's an issue with using range matching... I thought this was a valid sql matching format?
is it a problem with mysql_query() in php?
Code: Select all
$query = mysql_query("SELECT * FROM vendors WHERE name LIKE '[a-m]%' ORDER BY name");If I change [a-m]% to just a% it works for all a records, so it's an issue with using range matching... I thought this was a valid sql matching format?
is it a problem with mysql_query() in php?