I am trying to show replies for a post on a bulletin board that I am building. All of the replys are in my table bbMessages.
I have a page where you select the Topic and it goes to another page that displays the posts (bbmain.bbDescription). by the posts I need to show how many replys have been entered into the bbMessages table.
I have these tables:
bbTopic
bbTopicKey
BBTopic
bbmain
bbKey
bbTopicKey
bbDescription
bbMessages
bbMessageKey
bbKey
bbMessage
I tried this but it did not work. I got all messages that had a bbTopicKey of one.
SELECT bbtopic.bbTopicKey, bbmain.bbTopicKey, bbmain.bbKey, bbmessages.bbKey
FROM bbtopic, bbmain, bbmessages
WHERE bbtopic.bbTopicKey = 1 AND bbtopic.bbTopicKey = bbmain.bbTopicKey AND bbmain.bbKey = bbmessages.bbKey
Thanks for your help.