Jump to content


Photo

ORDER


  • Please log in to reply
1 reply to this topic

#1 natalieG

natalieG
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts

Posted 07 May 2006 - 10:13 PM

How do set up a query so that on a date column which contains ther record date, the data
arrives last entry first?

Thanks,

Natalie;

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 07 May 2006 - 10:31 PM

Adjust to suit ... assuming that the actual dates are yyyy-mm-dd style:
$query = "SELECT * from tablename ORDER by datefieldname DESC";

That should sort by latest to earliest date which is what I assume you wanted.


Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users