I have a mysql column name utc_date which holds a date in utc format. The datatype of utc_date is naturally date. What I need is to get all of the dates from this table in descending order. The query I am using is:
$query = "SELECT DISTINCT date FROM report_strength WHERE user_id=" . "'" . $this->user_id . "'" . " ORDER BY utc_date DESC";
So far I only have 5 entries in the report_strength table and this query returns the following list of dates:
12-01-2007, 12-05-2007, 10-18-2007, 01-19-2004, 02-01-2003 in order. This list is clearly not what its supposed to (not what I intended it to be). What do I need to do in order the get the list of dates in descending order? Thanks!