Quote:
Originally Posted by vbmechanic
That is strange! Can you post your code for the select and fetch_array?
|
Code:
$data = $DB_site->query("
SELECT thread.threadid, thread.title, thread.replycount, thread.postusername, thread.postuserid, thread.dateline,
IF(views<=replycount, replycount+1, views) AS views, forumid, post.postid, pagetext
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = thread.firstpostid)
WHERE forumid IN($newsforumid)
GROUP BY post.postid
ORDER BY dateline DESC");
while( $news = mysql_fetch_array($data) ) {
$postdate = vbdate("F d, Y", $news['dateline']); // FORMAT DATELINE
$news = parse_bbcode2($news['pagetext'], no, yes, $allowsmilie, yes);;
echo("<table class=tborder cellpadding=6 cellspacing=0 border=0 width=100% align=center><tbody>");
echo("<tr><td width=1% class=tcat><img src=\"images/byte/caticon.gif\" alt=\"Replies: ".$news["replycount"]."\" border=0></td>");
echo("<td class=tcat><a href=./forum/showthread.php?t=".$news["threadid"].">".$news["title"]."</a>");
echo("<div class=smallfont>Posted by: <a href=./forum/member.php?u=".$news["postuserid"].">".$news["postusername"]."</a></div></td></tr></tbody>");
echo("<tbody><tr><td class=alt1 colspan=2><div class=smallfont>$news</div>");
echo("<div class=right>$postdate</div></tr></td></tbody></table><br />");
}