I am displaying the data from a news table and the usernames from another table. The problem is it displays the oldest record first. I want to reverse the order and display the newest record first. How would I go about this.
while( $row = $db->sql_fetchrow($result) )
{
$user_ID = $row['user_ID'];
$title = $row['title'];
$content = $row['content'];
$date = $row['date'];
$usql = sprintf("SELECT username FROM phpbb_users WHERE user_id = " . $user_ID, 1);
$udata = mysql_query($usql) or die(mysql_error());
$user = mysql_fetch_assoc($udata);
$time = create_date($board_config['default_dateformat'], $date, $board_config['board_timezone']);
echo '<tr><td colspan="3" align="center"><table width="100%" border="0"><tr><td align="left">';
echo " <br>$title posted by <a href=\"profile.php?mode=viewprofile&u=$user_ID \">" . $user['username'] . "</a> on $time</td></tr><tr><td>";
echo "$content<br> </td></tr></table></td></tr>";
};