forumnz Posted September 18, 2007 Share Posted September 18, 2007 Alright. If I have a db for an auction site and I want to display the auctions closing soonest, how do I do this? I know how to code it, just the theory behind it? Thanks a lot, Sam. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted September 18, 2007 Share Posted September 18, 2007 Well, presumably you have an ending time for each item in the database? You'd then simply order by this value: <?php $sql = mysql_query("SELECT * FROM `yourtable` WHERE `somefield`='somevalue' ORDER BY `ending` DESC") or die(mysql_error()); ?> 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.