LIMIT the return of non-unique values

Nikmaior

New Member
I have two tables. Posts and Replies. Think of posts as a blog entry while replies are the comments.I want to display X number of posts and then the latest three comments for each of the posts.My replies has a foreign key "post_id" which matches the "id" of every post.I am trying to create a main page that has something along the lines ofPost--Reply--Reply--ReplyPost--Replyso on and so fourth. I can accomplish this by using a for loop in my template and discarding the unneeded replies but I hate grabbing data from a db I won't use. Any ideas?
 
Top