XpertWorlock Posted July 12, 2008 Share Posted July 12, 2008 Is it possible two sorts by two rows in a database I.e. Sort by one row (integer) and than another row (integer). 0/0, 0/1, 0/2, 0/3, 0/4, 1/0, 1/1, 1/2, 2/0, 2/1, etc. I've tried various methods and am trying to do it with as little code as possible Thanks alot Mike Link to comment https://forums.phpfreaks.com/topic/114413-solved-order-by-two-rows/ Share on other sites More sharing options...
PFMaBiSmAd Posted July 12, 2008 Share Posted July 12, 2008 I think you might be asking about sorting by two columns? If so, you need an ORDER BY term in the query that lists the columns - ORDER BY column1, column2 This will sort using column1 values, then within each value in column1, it will sort using the column2 values. Link to comment https://forums.phpfreaks.com/topic/114413-solved-order-by-two-rows/#findComment-588368 Share on other sites More sharing options...
XpertWorlock Posted July 12, 2008 Author Share Posted July 12, 2008 excellent that's exactly what I needed to know Yeah I worded it incorrectly Thanks greatly Topic Solved Link to comment https://forums.phpfreaks.com/topic/114413-solved-order-by-two-rows/#findComment-588440 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.