sql to select distinct records that start with the letter A
Posted: Sun Aug 30, 2009 9:36 pm
whats the query to select a distict record that starts with a certain letter... before i would do it like this, i would have a column in my table that says starting letter and for each thing i insert into the database i would have a form feild and ask for its starting letter
then i would have a list of letters like A, B, C, D, E, F, G, H, I... so on
each one would be linked... say A would be linked to page.php?letter=A
that way i could select everything where the starting letter = the $letter
and the $letter variable would be equal to $_GET['letter']
i realize there is prolly a distinct query that could do the same thing..
then i would have a list of letters like A, B, C, D, E, F, G, H, I... so on
each one would be linked... say A would be linked to page.php?letter=A
that way i could select everything where the starting letter = the $letter
and the $letter variable would be equal to $_GET['letter']
i realize there is prolly a distinct query that could do the same thing..