My dates are arranged by year-month-day (2008-02-03) in my database, but whenever I try to use ORDER BY, it orders it by month first, and not the year. I just want them in order from the most recent date to the oldest date. What I have so far is this: $query="SELECT * FROM vids ORDER BY vdate DESC"; "vids" being the table name and "vdate" being the date of the entry in year-month-day. How should this code look instead?
Store a timestamp, make sure the table is set to a INT and then you can just query the database with, SELECT * FROM `table` ORDER BY timestampfield DESC Code (markup):