View Full Version : Select posts from forum
Stasik
11-11-2001, 01:14 PM
Hey.... i`m a bit confised now :(
i need to select all posts knowking just forumid IN 1 QUERE...
postid->threadid->forumid
any ideas?
Admin
11-11-2001, 01:27 PM
SELECT * FROM post
LEFT JOIN thread USING (threadid)
WHERE thread.forumid=1;
Stasik
11-11-2001, 01:31 PM
cool, respect....... tnx
Stasik
11-11-2001, 02:08 PM
i have it more complicated
i have a table called xxx where is a column with postid.... i need a query which select data from table xxx using forumid :(
Stasik
11-11-2001, 02:13 PM
SELECT * FROM xxx LEFT JOIN post USING (postid) LEFT JOIN thread USING (post.threadid) WHERE thread.forumid=2
i think smth like that.... but cant get it ready :(
Admin
11-11-2001, 02:54 PM
SELECT * FROM xxx
LEFT JOIN post USING (postid)
LEFT JOIN thread USING (threadid)
WHERE thread.forumid=2
I just hope you don't have a threadid column in your xxx table.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.