labourstart Posted September 3, 2008 Share Posted September 3, 2008 In the PHP code for one of the pages on our site, we sort in descending order based on the date field. The problem is that this means that the newest items added to the database within a single date are moved to the bottom. How can we keep the newest items on top? We don't have a record ID or any other field to indicate which records are newest. Here is the code we’re using: $query2 = “SELECT * FROM news WHERE language = ‘no’ order by date DESC LIMIT 100″; Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 3, 2008 Share Posted September 3, 2008 You've got to store information about when within given date, the item has been added. Most logical would be extending date field to store date and time. 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.