Threw this together really quick, untested, but a general idea:
<table>
<tbody>
<tr>
<th>Thread</th>
<th>Views</th>
<th>Replies</th>
<th>Last Reply</th>
</tr>
<?php
$posts = mysql_query("
SELECT t.topic_id, t.author, t.title, t.date, t.replies, t.views, r.reply_id, r.date AS...