I have a rather querky but simple problem!
I want to select all the group names from my table with the first letter begining with the letter 'Z'.
Sounds simple but I can't seem to get it working. I have managed to do this for all of the other letters of the alphabet (i.e selecting all the group_names begining with 'A', 'B', 'C', 'D' ect...) using the following convention successfully:
$result = mysql_query( "SELECT group_name, category, region from Groups WHERE group_name >='D' AND group_name < 'E' order by group_name asc")
or die ("Couldn't execute query");
This works fine for every letter of the alphabet between A and Y, however I don't know how to bring up all the group names begining with the letter 'Z'!!!
I tried the following code but it failed to work:
$result = mysql_query( "SELECT group_name, category, region from Groups WHERE group_name >='Z' AND group_name < 'A' order by group_name asc")
or die ("Couldn't execute query");
how about just using groupname >= 'Z' given that A has a lower value so less than A probably wont work so strip that AND condition out and give it a whirl.
Bookmarks