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 Quote 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" Quote Link to comment https://forums.phpfreaks.com/topic/83360-order-by-query/#findComment-424098 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.