Azzyh Posted January 18, 2010 Share Posted January 18, 2010 Hi. I want to order the stuff that comes out of the query, by the closest dato matching and following. So like if the datetime right now is: 21/21/08 3:15 pm and theres a row with field "dato" that has 21/21/08 3:10 <- this should be the first on the top and then following.. hope you understand i tried myself alittle: $timenow = date('d/m/Y G:i:s'); ORDER BY dato < ($timenow) but doesnt seem to be right Quote Link to comment Share on other sites More sharing options...
Buddski Posted January 18, 2010 Share Posted January 18, 2010 Does "ORDER BY dato DESC" or "ORDER BY dato ASC" give you what you want.. Quote Link to comment Share on other sites More sharing options...
al Posted January 18, 2010 Share Posted January 18, 2010 Or you could try: ORDER BY dato < NOW(); Quote Link to comment Share on other sites More sharing options...
Azzyh Posted January 18, 2010 Author Share Posted January 18, 2010 Thanks Buddski. ASC worked well for me 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.