radox1 Posted July 18, 2011 Share Posted July 18, 2011 We are wanting to build a recent activity table in our website which will act as a timeline for recent orders. The current table id | order date | shipping date | declined date 1 11-01-11 19-01-11 2 13-01-11 14-01-11 3 15-01-11 16-01-11 4 15-01-11 15-01-11 The required output should be (sorted by most recent date date) 1 19-01-11 (shipped) 3 16-01-11 (shipped) 4 15-01-11 (shipped) 2 14-01-11 (declined) One way I have though to do this is add another field in the table 'updated date' and then simply sort by this. I am just wondering if there is a more efficient way? Quote Link to comment Share on other sites More sharing options...
fenway Posted July 18, 2011 Share Posted July 18, 2011 Well, you could store a record with (orderID, date, type). Quote Link to comment 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.