Damien2005
05-30-2006, 02:46 PM
Hello all..
Im realy a n00b with php so i hope to find some help here..
I try to include forum.title AS fot in this piece of code.. But when i add it i get a database error.. what do a wrong :banana:
Cheerz, Damien
$getstats_threads = $db->query_read("
SELECT
thread.threadid, thread.title, thread.lastpost, thread.forumid, thread.replycount, thread.lastposter, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, thread.visible, user.username, user.userid, user.usergroupid, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
" . iif($deljoin, ", NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason") . "
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.username = thread.lastposter)
$deljoin
WHERE NOT ISNULL(thread.threadid)
$excludedforums
" . iif(!$deljoin, "AND thread.visible <> 2") . "
ORDER BY lastpost DESC LIMIT 0, $displayrecords");
Im realy a n00b with php so i hope to find some help here..
I try to include forum.title AS fot in this piece of code.. But when i add it i get a database error.. what do a wrong :banana:
Cheerz, Damien
$getstats_threads = $db->query_read("
SELECT
thread.threadid, thread.title, thread.lastpost, thread.forumid, thread.replycount, thread.lastposter, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, thread.visible, user.username, user.userid, user.usergroupid, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
" . iif($deljoin, ", NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason") . "
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.username = thread.lastposter)
$deljoin
WHERE NOT ISNULL(thread.threadid)
$excludedforums
" . iif(!$deljoin, "AND thread.visible <> 2") . "
ORDER BY lastpost DESC LIMIT 0, $displayrecords");