Gmunky Posted April 5, 2007 Share Posted April 5, 2007 There is a list from a database I want to be able to print out and sort them by last name within first name but also if there isn't a name, I want to print out the company name in alphabetical order first and then the names. fname | lname | company name| ------------------------------- james| blunt | | John | blunt| bryan | wilson| | | |focus co. | | | gap | I want to be able to print out in this sort of order: focus co. gap blunt, james blunt, john wilson,bryan My query is 'Select * from table order by lname,fname asc'] The problem with this is that the company names are not in order. Link to comment https://forums.phpfreaks.com/topic/45731-help-with-sorting-multiple-levels/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.