Suppose I have a forum app, like vbulletin. I would store the threads in THREADS table and THREADS table will have forum_id field that would tie it with the FORUMS table.
Now I want to display 4 blocks on home page, each block is the latest 10 posts from 4 different forums.
I also want to select forum titles, so I can use them in block titles. the forum titles are store in FORUMS table, of cause.
Is there a way to select the 40 rows from THREADS table in one SQL select for that?