Ordering of Dates

2001-05-11 Thread Colt Ramsden
I'm creating a Blogger-like system for my website and I have it check for posts within the last 14 days using the following command: $result = mysql_query(SELECT * FROM data WHERE TO_DAYS(NOW()) - TO_DAYS(postdate) = 14,$db); However, in the while loop and the printf's this is going to display

RE: Ordering of Dates

2001-05-11 Thread Chris Bolt
Add ORDER BY postdate DESC to the end of the query. I'm creating a Blogger-like system for my website and I have it check for posts within the last 14 days using the following command: $result = mysql_query(SELECT * FROM data WHERE TO_DAYS(NOW()) - TO_DAYS(postdate) = 14,$db); However, in