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.
wall_posts
postId | post
post_comments
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?PHP Code:SELECT post,comment FROM wall_posts
LEFT JOIN wall_posts ON post_comments.postId=wall_posts.postId
LIMIT 10
Thank you









Bookmarks