Ouwe rakker |
|
Hoewel ik je database layout niet weet heb ik geprobeerd met de info welke je geeft een betere query neer te planten.
<?php
$qGetTopics = mysql_query("SELECT
t.`id` AS `topicid`, u.`id` AS `userid`, `replies`, `views`, `title`, `author`
FROM
`topics` AS t, `users` AS u
WHERE
`catid` = ".(int)$catid."
AND
t.`username` = u.`username`");
while ($aTopic = mysql_fetch_assoc($qGetTopics))
{
?>
<tr>
<td width="40%"><?= '<a href="?page=forum/index&act=view&cat='.$catid.'&id='.$aTopic['topicid'].'">'.$aTopic['title'].'</a>';?></td>
<td width="15%"><?= '<a href="?page=users/memberlist&show=profile&id='.$aTopic['userid'].'">'.$aTopic['author'].'</a>'; ?></td>
<td width="10%"><?= $aTopic['replies']?></td>
<td width="10%"><?= $aTopic['views']?></td>
</tr>
<?php t.`id` AS `topicid`, u.`id` AS `userid`, `replies`, `views`, `title`, `author` FROM `topics` AS t, `users` AS u WHERE `catid` = ".(int)$catid." AND t.`username` = u.`username`"); { ?> <tr> <td width="40%"><?= '<a href="?page=forum/index&act=view&cat='.$catid.'&id='.$aTopic['topicid'].'">'.$aTopic['title'].'</a>';?></td> <td width="15%"><?= '<a href="?page=users/memberlist&show=profile&id='.$aTopic['userid'].'">'.$aTopic['author'].'</a>'; ?></td> <td width="10%"><?= $aTopic['replies']?></td> <td width="10%"><?= $aTopic['views']?></td> </tr>
|