order by and timestamp
hey, I am trying to print some entries from the database and order them by time. but a limit of 5. I am printing them just fine, but it is printing the entries and ordering them based on the month, then day, then year. I want it to print based on year, month, day... any help? here's the current code.
PHP:<?php
$result2=mysql_query("SELECT id, DATE_FORMAT(`date`, '%m.%d.%y') as `date`, location, state, TIME_FORMAT(`time`, '%h:%i') as `time`, price, status, ampm, city FROM shows WHERE (`date` < $currentdate) ORDER BY `date` ASC LIMIT 0,5");
?>
thanks!
___________________
--Casey Britt (casey@bshosting.com) |
BS Web Design | BS Hosting
You can hear me sing here

