fesan Posted January 14, 2009 Share Posted January 14, 2009 Hello.... I'm printing out some data from my database. Is it possible to Order the outcome by two columns? $query = "SELECT * FROM $dbtable WHERE type = 'Mac 300' ORDER BY type AND nr"; I tried out the code over but it didn't do what i hoped it would do. How i want it: Martin | 1 Martin | 2 Martin | 3 and so on... This is how it comes out now: Martin | 2 Martin | 1 Martin | 3 Link to comment https://forums.phpfreaks.com/topic/140820-solved-order-by/ Share on other sites More sharing options...
rhodesa Posted January 14, 2009 Share Posted January 14, 2009 $query = "SELECT * FROM $dbtable WHERE type = 'Mac 300' ORDER BY type, nr"; Link to comment https://forums.phpfreaks.com/topic/140820-solved-order-by/#findComment-737051 Share on other sites More sharing options...
fesan Posted January 14, 2009 Author Share Posted January 14, 2009 Awsome!!! Thank you for very quick reply!! Link to comment https://forums.phpfreaks.com/topic/140820-solved-order-by/#findComment-737055 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.