Page 1 of 1

list output from recent to previous?

Posted: Wed Feb 18, 2009 8:24 pm
by melchor_06
i need to know how can i list the ouputs from my database
which the recent input will on top and the previous will on the bottom.

my code is this:

Code: Select all

 
<?php echo date("mdY",$value['date']); ?>
 
which outputs data from previous on top and the recent will be on the bottom.

thanks guys...

Re: list output from recent to previous?

Posted: Wed Feb 18, 2009 9:27 pm
by susrisha
in your mysql query give it order by date DESC

eg:
$query = "SELECT * FROM table ORDER BY datevariable DESC";