LEFT JOIN and LIMIT only 1 table
I would like to display on the same page last 10 posts and also all comments for each post. What would be the best way to make this? The problem with LEFT JOIN is it limits 10 posts and comments together.
postId | post
commentId | comment | postId
So this is not ok because it can shows only 1 post and 9 comments:
Do I actually need to use 10 queries?
SELECT post,comment FROM wall_posts
LEFT JOIN wall_posts ON post_comments.postId=wall_posts.postId