justAnoob Posted January 30, 2010 Share Posted January 30, 2010 just looking to get the 3 most recent records. can't seem to get this. see anything wrong? <?php $sql = mysql_query('SELECT id, category, track_name, username_id FROM tracks WHERE category = "supercross" ORDER BY DESC LIMIT 0, 3'); ?> Quote Link to comment Share on other sites More sharing options...
trq Posted January 30, 2010 Share Posted January 30, 2010 Your missing a field in your ORDER BY clause. You'll wan't to order by a timestamp field of some sort if you want to sort by most recent. Quote Link to comment Share on other sites More sharing options...
justAnoob Posted January 30, 2010 Author Share Posted January 30, 2010 ooppss, thanks. 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.