hi there, I've written a script to retrieve news entries from my mySQL database but I get the information accending, instead of decending... how do i change it so that the news articles display newer on top? (Highest news ID - lowest)
this is what I have:
Any ideas?
this is what I have:
Code:
mysql_select_db("news") or die(mysql_error());
$query = "SELECT * FROM news_post";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result))
{
echo "<div style='border: 1px solid rgb(170, 170, 170); padding: 10px; margin-bottom: 10px; clear: both;'>
<div style='margin: 5px; padding: 5px; float: right;'>
<img src='images/cs_source.gif' style='border: 0pt none ;'>
</div><div class='topictitle'>
" . "{$row['news_title']} </div><div class='postdetails'>" .
"{$row['news_date']} by " .
"{$row['news_poster']} </div><hr><div class='postbody'>" .
"{$row['news_body']} </div><br></div>";
}
Any ideas?