I am working on a rule to find out which question has the highest correct answer. Not sure how to work with this. But here is an explanation of what I have so far and what I want my program to do.

I have question and answer table
Question: questionid,QuestionName, Questionchoice1,Questionchoice2, Questionchoice3, Questionchoice4,answer1,answer2,answer3,answer4
Answer: answerid, Answer1,Answer2,Answer3,Answer4,questionid

Question table is where the admin will add question,choice for these and the answers.
Answer table will have answers to these question that were taken by students.

So now what I want to do is, get all the answer for each question and find out which question was answered correctly the most.

Recommended Answers

All 2 Replies

where is student id, how will you know, that who answered what?

Why do you have multiple fields for storing one question's answer??
like you have answer1,answer2,answer3 and answer4...

do you want to provide multiple answers to be true for one question?

Please clarify this. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.