Coldfusion: Counting comments.
I'm creating a blog and I want to count the comments viewers have left.
So far I've created a database with two tables, one for the articles, and the other for the comments.
Here is the structure of my database:
Databasename: testBlogDB
- Table One Name: tblmainindex
- rowID
- articleTitle
- article
- Table Two Name: tblcomments
- commentID
- comments
The software I am using is Dreamweaver 8. I need to know how to set up the query as far as what to SELECT, where FROM, and what ever else. When I tried to do this earlier I was counting all the comments in the database by #testBlogDB.RecordCount#, which is wrong. I only want to count comments related to the article, so which rows do I join?
Also, I need clarification on the <cfoutput></cfoutput> settings.
Please, please do not refer me to Ben Forta's blog application. I purposely wanted to do this blog from scratch. How else am I supposed to learn? I appreciate all of your help, thank you so much.
Hope to hear from you soon.
Now...I can take my tylenol. Thanks again!
Comments
Be the first to write a comment
You must me logged in to write a comment.