I have a section of my website that reads out data to the user.
My current code reads out data in the same order, even when new records are added; they are added at the end of the data that is being echoed out. I want to read out the most recent data as I am creating a message board.
CODE:
session_start();
$sess = $_GET['id'];
$profile_query = "SELECT * from forum WHERE postee = $sess";
$profile_queried = mysql_query($profile_query);
while($row = mysql_fetch_array($profile_queried))
{
echo '<div class="each_post"><p>'.$row['content'].'</p></div>';
}
Question: How can I echo data from a database in order of recency? Must I add another field to do this?