The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
A n00b question
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 Code:
$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"); |
#2
|
|||
|
|||
What database error did you get?
|
#3
|
|||
|
|||
Quote:
Thanks for your replay Cheerz Damien.. I get this error.. Code:
Database error in vBulletin 3.5.4: Invalid SQL: SELECT forum.title, userid, usergroupid, IF(displaygroupid=0, usergroupid, displaygroupid) AS displaygroupid, username, posts FROM user ORDER BY posts DESC LIMIT 0, 5; MySQL Error : Unknown column 'forum.title' in 'field list' Error Number : 1054 Date : Tuesday, May 30th 2006 @ 07:56:53 PM Script : http://www.test.orgindex.php Referrer : http://www.test.org/index.php?do=head IP Address : 282.76.244.35 Username : vb_forum Classname : vb_database |
#4
|
|||
|
|||
Are you sure forum.title exists?
and u want to extract from table user? Isn't there a prefix? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|