burningsoul
MIS
I am currently working on creating a poll for my website ( however, it's a bit more than a poll, what i call a 'top ten'.
the idea behind it is for people to be able to vote for their favorite album, song and video. i want to display all 3 voting options on the same page dynamically using a Microsoft Access DB. My trouble is writing the correct SQL statement to join the two tables together so I can query and display all 3 questions with their associated answers (which will be in a drop-down box).
I have created two tables: toptenQuestions and toptenAnswers
toptenQuestions:
QuestionID (autonumber, PK)
Question (text)
toptenAnswers:
AnswerID (autonumber, PK)
QuestionID (number, FK)
Answer (text)
Vote (number, to hold the vote count)
As mentioned, my trouble is creating a query that will read the data from the toptenQuestions table and at the same time the toptenAnswers table. I then want to be able to reference the query on the page and list 1) the question for each QuestionID and 2) the associated answers for each question in a drop-down box.
When submitted to results.cfm the query will update the Vote field depending on what the user chose for each question.
Thoughts are greatly appreciated!
the idea behind it is for people to be able to vote for their favorite album, song and video. i want to display all 3 voting options on the same page dynamically using a Microsoft Access DB. My trouble is writing the correct SQL statement to join the two tables together so I can query and display all 3 questions with their associated answers (which will be in a drop-down box).
I have created two tables: toptenQuestions and toptenAnswers
toptenQuestions:
QuestionID (autonumber, PK)
Question (text)
toptenAnswers:
AnswerID (autonumber, PK)
QuestionID (number, FK)
Answer (text)
Vote (number, to hold the vote count)
As mentioned, my trouble is creating a query that will read the data from the toptenQuestions table and at the same time the toptenAnswers table. I then want to be able to reference the query on the page and list 1) the question for each QuestionID and 2) the associated answers for each question in a drop-down box.
When submitted to results.cfm the query will update the Vote field depending on what the user chose for each question.
Thoughts are greatly appreciated!