PHP Code:
$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
WHERE forumid IN($id)
ORDER BY threadid DESC
");
That query is basicly taking alot of info from the table thread. I wanted to grab the forum name from the database. Seeing the thread table don't have the title of forums just ids. I tried getting it from the forum table in the same query. I just added a "forum.title as forumtitle" But i get an sql error
mysql error: Unknown table 'forum' in field list
Any ideas how to grab info from to tables in the same query? Thanks a bunch