hi all,
i have a mysql db with a datetime field formatted as such:
datetime yyyy-mm-dd 00:00:00
and my sql query looks like such:
$anyday = mktime (0,0,0,date("m") ,date("d"), date("Y"));
$valueOfAnyDay = date("M d, Y",$anyday);
SELECT *,date_format(eventDate, '%M %d, %Y') as eventDate FROM tbl_events where eventDate >= '".$valueOfAnyDay."' order by eventDate
HOWEVER, the sort is all weird:
it lists it as such:
July 3
July 20
June 12
May 27
when it should be listing as:
May 27
June 12
July 3
July 20
i notice that when I take out the date_format(...) piece of code, it sorts correctly.
any suggestions?