Databases: relation between mdl_forum and mdl_forum_posts

Databases: relation between mdl_forum and mdl_forum_posts

by Ion Padilla -
Number of replies: 1
I thought the relation between these tables had to be forum.id and posts.discussion, but seems to be different. Anyone knows the relation between these tables? Thanks
Average of ratings: -
In reply to Ion Padilla

Re: Databases: relation between mdl_forum and mdl_forum_posts

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I assuem it is

SELECT *
FROM mdl_forum f
JOIN mdl_forum_discussions fd ON ON fd.forum = f.id
JOIN mdl_forum_posts fp ON tp.discussion = fd.id