Well, I'm not so sure though. If this is just a random multiple question everyday then I would go with this design:
- We will show a label as question and a few Radiobox for answer.
- Select a random question which the last occured is more than a week or well, you decide it.
- A timer control, every second it go up, 1 point will be decrease from the total point.
Quick-And-Easy
DB
tblUser
All the information, their correct answer and total question they took.
tblQuestion
All the question and the last time it occured.
If you don't mind about how big your database is or how complex it is.
tblUser
--Well all the user information if neccesary
tblQuestion
--List of all questions
tblAnswers
--List of all answer
tblAnswersQuestion
--Link the answer table and question table
[B]tblResult[B]
--Store when the user answer the question, is that correct or not and how long it take him to answer that...
With this structure sure you could calculate the statistic easily. But I think it's over the top a bit.
Thanks for all the help guys, I've solved it with placing a new column named time in the database file.
I've actually added a DateTimePicker control and only allow the user to select the time so that the user can specify the timing of the question to be set on each day. However, its giving me a syntax error in the SQL insert into statement
sql = "insert into questions(qdate, ques, ans1, ans2, ans3, ans4, ans, prize, time) values('" +
dtpQues.Value.ToString("dd-MMM-yyyy") + "','" +
dtpTime.Value.ToString("hh:mm:ss tt") + "','" +
txtQues.Text + "','" +
txtAns1.Text + "','" +
txtAns2.Text + "','" +
txtAns3.Text + "','" +
txtAns4.Text + "','" +
right + "','" +
txtPrize.Text + "'" +
")";
I think the error lies in this:
dtpTime.Value.ToString("hh:mm:ss tt") + "','" +
It somehow complains about the format, but I have actually set the custom format to be hh:mm:ss tt.
Any ideas?
Thanks.