thefollower Posted December 12, 2007 Share Posted December 12, 2007 How do you sort a query result by oldest first? I got this query: $GetReports = mysql_query("SELECT * FROM reportedusers WHERE StaffRead='0'") or die(mysql_error()); And i have an additional filed which is: TimeReported in this format : date("Y-m-d H:i:s",time()); And i wanted the query to make sure the oldest row was the first one to come out when fetch_assoc function occurred...is that possible? Quote Link to comment Share on other sites More sharing options...
zq29 Posted December 12, 2007 Share Posted December 12, 2007 SELECT * FROM `reportedusers` WHERE `StaffRead`='0' ORDER BY `TimeReported` ASC 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.