rendered paste body <?php
echo '<table border="1" width="100%" align="center">';
echo '<tr>';
echo '<td width="650"><center>Topic</center></td>';
echo '<td width="100"><center>Topic starter</center></td>';
echo '<td width="100"><center>Last Post By</center></td>';
echo '</tr>';
$result = mysql_query("SELECT * FROM `topics` ORDER BY `lastpost` DESC");
$last_post = mysql_query("SELECT `last_post_alias` FROM `topics`");
$last_post_alias = mysql_fetch_array($last_post);
while($row = mysql_fetch_array($result)){
?>
<tr height="30">
<td width="650">
<a href="topic.php?tid=<?=$row['id'];?>"><?=$row['title'];?></a>
</td>
<td width="100">
<center><?=$row['alias'];?></center>
</td>
<td>
<center><? if(mysql_num_rows($last_post)>=1){ echo $last_post_alias['last_post_alias']; }else{ echo 'No comments yet'; }?></center>
</td>
</tr>
<?
}
echo '</table>';
?>