eleven0 Posted March 9, 2008 Share Posted March 9, 2008 I'm trying to list all of my members from my database according to their ranks. I have a column where i keep all of my ranks for each person. They are more than ten. Here are the ranks; Cpt. 1lt. 2lt. FSgt. and so on.. Link to comment https://forums.phpfreaks.com/topic/95292-order/ Share on other sites More sharing options...
Barand Posted March 9, 2008 Share Posted March 9, 2008 SELECT * FROM members ORDER BY FIELD(rank, 'Cpt.', '1lt.', '2lt.', 'FSgt.') Link to comment https://forums.phpfreaks.com/topic/95292-order/#findComment-488067 Share on other sites More sharing options...
eleven0 Posted March 10, 2008 Author Share Posted March 10, 2008 Thank you Barand. Link to comment https://forums.phpfreaks.com/topic/95292-order/#findComment-488199 Share on other sites More sharing options...
eleven0 Posted March 10, 2008 Author Share Posted March 10, 2008 Would this work if there were two fields? Link to comment https://forums.phpfreaks.com/topic/95292-order/#findComment-488239 Share on other sites More sharing options...
Barand Posted March 10, 2008 Share Posted March 10, 2008 .... ORDER BY FIELD(rank, 'Cpt.', '1lt.', '2lt.', 'FSgt.') , otherfield Link to comment https://forums.phpfreaks.com/topic/95292-order/#findComment-488287 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.