SirChick Posted January 11, 2008 Share Posted January 11, 2008 How would go about selecting the most recent row when sorted by "timestamp" in a query ? Is it ORDER BY ASC TimeStampField ... then just mysql_fetch_assoc for the first row? Quote Link to comment Share on other sites More sharing options...
drummer101 Posted January 11, 2008 Share Posted January 11, 2008 it would be DESC Quote Link to comment Share on other sites More sharing options...
SirChick Posted January 11, 2008 Author Share Posted January 11, 2008 oh yeh ! Good point lol thanks ! Quote Link to comment Share on other sites More sharing options...
trq Posted January 11, 2008 Share Posted January 11, 2008 SELECT fld FROM tbl ORDER BY stamp LIMIT 1; Quote Link to comment Share on other sites More sharing options...
SirChick Posted January 12, 2008 Author Share Posted January 12, 2008 LIMIT 1 ! So thats what i was meant to put! I kept putting Limit = 1 ! heh Thankyou thorpe! 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.