|
|
|
|
Joined: Dec 2005
Posts: 122
member
|
|
member
Joined: Dec 2005
Posts: 122 |
I need to use MySQL select all messages from a specific forum on a periodic basis for export to another application. However, forum information is not stored with the POSTS table.
Which table stores the forum information for posts?
And can anyone help me with with a MySQL command that can select all posts from a specific forum?
Thanks.
|
|
|
|
|
Joined: Jun 2006
Posts: 16,532 Likes: 150
|
|
Joined: Jun 2006
Posts: 16,532 Likes: 150 |
the topics table stores the forum that owns the post.
|
|
|
|
|
Joined: Aug 2006
Posts: 1,360 Likes: 2
Veteran
|
|
Veteran
Joined: Aug 2006
Posts: 1,360 Likes: 2 |
SELECT t1.POST_ID FROM
ubbt_POSTS as t1,
ubbt_TOPICS as t2
where t1.TOPIC_ID=t2.TOPIC_ID
and t2.FORUM_ID=4 This will give you all the post_id's that are in forum 4.
|
|
|
|
|
Joined: Dec 2005
Posts: 122
member
|
|
member
Joined: Dec 2005
Posts: 122 |
thanks a lot for that! i'm now off and running! i'm actually exporting messages from one of my threads forums to an other website. ( www.jakchat.com indonesian business news digest forum --> www.jawawa.net ) it's working just great! now all i have to do is work out a way to automagically import anonymous messages posted on jawawa.net back into the threads business forum ... though this could be just a little too ambitious!
|
|
|
|
4 members (mmem700, vscope, SteveS, 1 invisible),
668
guests, and
128
robots. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
|
|
|