Show Newest Entry First, Pulling From Database.
I have a page that displays all blog posts for a certain site. This is what the code looks like:
PHP Code:
<?php
$query = "SELECT Id,Date,Title,Post FROM blogs";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result)){ ?>
<h2><a href="index.php?page=blogs&id=<?=$row['Id']?>" class="ta"><?=$row['Title']?></a> <i><?=$row['Date']?></i></h2>
<?=$row['Post']?>
<div class="lorum"></div>
<?php }
Is there any way that I can display those posts shown at the bottom, at the top? I'd like the newest entries to be shown first, before the older. Any ideas on how to flip it to make that possible?
Thou com'st in such a questionable shape
Hamlet, Act 1, Scene 4
Bookmarks