The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Check this query please
PHP Code:
mysql error: Unknown table 'forum' in field list Any ideas how to grab info from to tables in the same query? Thanks a bunch |
#2
|
||||
|
||||
Try a JOIN:
PHP Code:
|
#3
|
|||
|
|||
Ya i tried the LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON (forum.forumid = thread.forumid)
But i kept getting a mysql error: Column: 'forumid' in where clause is ambiguous |
#4
|
|||
|
|||
Just need to specify where the forumid field is from. So this will work.
[SQL] $info = $DB_site->query(" SELECT thread.threadid as threadid,thread.title as title, thread.forumid as forumid, thread.postusername as postusername,thread.postuserid as postuserid,thread.dateline as dateline, thread.views as views,thread.replycount as replycount,forum.title as forumtitle FROM thread AS thread LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON (forum.forumid = thread.forumid) WHERE forum.forumid IN($id) ORDER BY threadid DESC [/SQL] However, if this script has access to $forumcache you don't need to select the forum title from the table, and therefore no need for a join. such as... PHP Code:
|
#5
|
|||
|
|||
Ok this is what i placed
PHP Code:
Quote:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|