I am trying to display, well I have succeeded in doing to, the information from a DataBase Table. However I need to reverse the displaying so that it shows the Newest entries first and the Oldest entries last. Below is the code I have. Any assistance in this would be much appreciated.
mysql_connect("localhost", "username", "password") or die(mysql_error());
mysql_select_db("database") or die(mysql_error());
$data = mysql_query("SELECT * FROM post")
or die(mysql_error());
Print "<table border=0 cellpadding=0>";
while($result = mysql_fetch_array( $data ))
{
Print "<tr bgcolor=grey>";
Print "<td>ID: ";
Print "".$result['id'] . "</td></tr>";
Print "<td>Date Submitted: ";
Print "".$result['day'] . " - ";
Print "".$result['month'] . " ";
Print "".$result['date'] . ", ";
Print "".$result['year'] . "</td></tr>";
Print "<td>Submitted by: ";
Print "".$result['name'] . "</td></tr>";
Print "<td>Topic: ";
Print "".$result['topic'] . "</td></tr>";
Print "<td>Subject: ";
Print "".$result['subject'] . "</td></tr>";
Print "<td>Info Given: ";
Print "".$result['info'] . "</td></tr>";
Print "<td>Issue Resolved: ";
Print "".$result['resolved'] . "</td></tr>";
Print "<td>";
Print "<hr>" . "</td></tr>";
}
Print "</table>";