mysql query - blog posts and comments with limit
- by Lemon
Hi,
I have 2 tables: comments and posts and I'd like to display a list of 15 posts and maximum 2 most recent comments under each blog post
the database scheme looks like this
posts_table: post_id, post_txt, post_timestamp
comments_table: post_id, comment_txt, comment_timestamp
how the mysql query should look like to select 15 posts and related comments (max 2 most recent ones per post) ???
thanks,
Leo