Creating a Blog Engine For Someone - CountOfReplies Question

  • Thread starter Thread starter Will Chamberlain
  • Start date Start date
W

Will Chamberlain

So I'm creating a blog engine for someone and am curious how to go about
creating the count (if any) of the comments for a particular post.
Underneath each post the user will have name of the poster, date, time,
and an option for replying (commenting). I would like to create a count
of replies so that it is displayed. I have a dbBlog (Access) and a table
for the entries and a table for comments. They are tied together with
primary key being id. I understand the concept of doing a rowcount for a
specific id but not for all of the posts. How could I go about doing a
count while binding the entries to the datalist?
 
Select dbBlog.*, Count(dbComments.*) as theCount from dbBlog join dbComments
on dbBlog.blogID = dbComments.blogID.....

you get the idea
 
Thanks Curt. I'll be able to try this in about half an hour but was
wondering if the output would look similar to:

ID | TOPIC | MESSAGE | ReplyCount

1 | Test Topic #1 | message #1 | 3
2 | Test Topic #2 | message #2 | 0
3 | Test Topic #3 | message #3 | 8

Thanks again for your feedback.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top