jwwceo Posted December 27, 2007 Share Posted December 27, 2007 I have a database with country names in it. This populates a drop down. I would like the US to show up at the top of this list. How would I structure a query to ORDER BY "specific country id" AND THEN "alphabetic after that". Is this possible??? James Link to comment https://forums.phpfreaks.com/topic/83360-order-by-query/ Share on other sites More sharing options...
fenway Posted December 27, 2007 Share Posted December 27, 2007 Try "ORDER BY (IF countryid = <the-id-of-the-US>, 0, 1), country_name ASC" Link to comment https://forums.phpfreaks.com/topic/83360-order-by-query/#findComment-424098 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.