Results 1 to 3 of 3
Thread: LEFT JOIN and LIMIT only 1 table
Nov 24, 2010, 17:30 #1
- Join Date
- Feb 2007
- 0 Post(s)
- 0 Thread(s)
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:
SELECT post,comment FROM wall_posts
LEFT JOIN wall_posts ON post_comments.postId=wall_posts.postId
Thank youDilster.com - Dating blog where you can find new dating tips, advices and ideas or your partner.