$forum_query="select * from mybb_threads limit 10";
$forum_results=mysql_query($forum_query) or mysql_error();
?>
<table width="100%" cellspacing="1" border="0">
<?php
while($forum_rows=mysql_fetch_array($forum_results)){
$uid=$forum_rows['uid'];
$r=mysql_query("select * from mybb_users where uid=$uid");
$rows=mysql_fetch_array($r);
?>
<tr>
<td class="trow1"><a href='forums/showthread.php?tid=<?=$forum_rows['tid']?>'><?php echo $forum_rows['subject']; ?></a></td>
<td class="trow1"> <?php $forum_rows['replies']; ?></td>
<td class="trow1"> <?php echo $forum_rows['views']; ?></td>
<td class="trow1"><a href='forums/member.php?uid=<?=$forum_rows['uid']?>&action=profile'> <?php echo $rows['username']; ?></a></td>
</tr>
<?php
}
echo "</table>";
mysql_query("SET NAMES 'utf8'");