nasimuddin58
-
Posts
1 -
Joined
-
Last visited
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
My QUIZ site's Ranking page is not working properly
in MySQL Help
Posted
I have created a quiz site for my users to win some cash prize. They have to login and play(only one chance per test per user). And on the leader-board every one can see everyone's position according to their acquired marks. Each test has unique "testid". Each test has 10 questions (Serials 1-10). Now comes to the problem: Suppose Question 1 & Question 4 of Test 1 have the right answer "Option B". On the other hand Question 1 & Question 4 of Test 2 have the right answer "Option B". When a user wants to view the leader-board of "Test 1", the page adds up the marks of correct answers from Question 1 to Question 2 of Test 1. But it also adding the marks of Question 1 and Question 4 of Test 2 (As the answers of Q1 & Q4 of both the tests are same.) Although Test 2 has not yet answered by that user.
Here is the code: