Not displaying in date order
Posted: Sun Apr 13, 2008 6:14 pm
I am wanting to display the table dates in date order. When I test the following mysql query it just doesn't display in the order that I want:
This is the way it displays:
Monday, February 4, 2008
Monday, July 9, 2007
Monday, November 12, 2007
Monday, September 17, 2007
I want it to display in this order:
Monday, February 4, 2008
Monday, November 12, 2007
Monday, September 17, 2007
Monday, July 9, 2007
My table structure is:
id // the auto incremented primary key number
title
body
date_entered // type: date
Can someone please tell how I can get the query to display in the date order I want? Thanks in advance.
Code: Select all
$query = mysql_query("SELECT title, DATE_FORMAT(date_entered, '%W, %M %e, %Y') as date_entered FROM `mediareleases` ORDER BY date_entered ASC") or die("Could not query because: ".mysql_error());Monday, February 4, 2008
Monday, July 9, 2007
Monday, November 12, 2007
Monday, September 17, 2007
I want it to display in this order:
Monday, February 4, 2008
Monday, November 12, 2007
Monday, September 17, 2007
Monday, July 9, 2007
My table structure is:
id // the auto incremented primary key number
title
body
date_entered // type: date
Can someone please tell how I can get the query to display in the date order I want? Thanks in advance.