drisate Posted March 17, 2008 Share Posted March 17, 2008 I have a table with names and i would like to sort them by letters A B C D E F G H [...] When you clique on the letter it shows all the names in alphabetic order The The names looks like Patrick Simard So that would be in the P ... How to in 1 query Explode every letter and sho only the names that has the first = to p then sort them to alphabetical order? Link to comment https://forums.phpfreaks.com/topic/96565-query-question/ Share on other sites More sharing options...
bpops Posted March 17, 2008 Share Posted March 17, 2008 something like $query = "SELECT * FROM myTable WHERE lastName like 'p%' ORDER BY lastName'; Link to comment https://forums.phpfreaks.com/topic/96565-query-question/#findComment-494190 Share on other sites More sharing options...
drisate Posted March 17, 2008 Author Share Posted March 17, 2008 Ah man ... why didint i think of that >.< (Shame) lol thanks bro Link to comment https://forums.phpfreaks.com/topic/96565-query-question/#findComment-494192 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.