So my database setup is fairly simple.
I have a forum_cat
table (a forum category) and forum_post
table.
The forum_post
has a field fk_forum_cat_id
which ties each forum post to a category.
Each forum_post
also has a field fk_parent_forum_post_id
which basically says it belongs to an original post.
Further more, there is a date_added
and date_edited
field in forum_post.
Now, I am trying to generate the front page for my forum. I want to show a list of forum categories. Each one category should have a post count and the latest post. Could someone give me some direction with a query that does that all in one. I don't want to run 20 separate queries!