hi to help u answer some questions about a quiz.
I would store the questions and answer in a text file.
This way u can adapt the questions quite easily for any purpose.
I wrote one in Flash but not in DB and its the same principles.
I found that i stored my text file like this
Question1 : A1 : A2 : A3 : A4
Its broken down into 5 peices of data.
In order to know what Answer is right we always
place the correct answer into A1, but when we display
the questions we shuffle them around a bit.
they are all strings then u just need to compare the
users guess answer against the answer 1 location
the : symbols denotes a new data entry for the computer to know when its jumping to a new peice of data.
You may not need this in DB but I remember I needed this in the flash version
Ok now we have the question theory down also keep in mind that when your user makes a guess u should display a timer so there is a result from the time it took to guess.
U can trap the questions to either allow the user to make 4 guesses until he gets it or one guess per question then it moves onto the next question.
to make the question answering theory a bit more understandable you might want to make a function
this function would read in the next Question and Answers and display on the screen at the correct locations each time since its a repetitive process
eg: psuedo code in case i miss something
we denote a Card to be a Question with 4 answers
we also assume u have read the data in and its going to be fed into the function in this example but it is only one scenario.
function ShowCard(Q$,a1$,a2$,a3$,a4$)
text 10,10,Q$
text 10,30,a1$
text 10,50,a2$
text 10,70,a3$
text 10,90,a4$
endfunction
so in this mini example the function prints the information in a series of lines down the screen fromt he top left corner.
interaction
ok now your user could press a button via a mousepress or just press a key.
You should explore a trapping method so your keypress or mouseclick isnt rapid firing and therefore slowing down the whole thing and creating bugs in double click events etc..
explore the keystate command and look in the tutorials section or on the net for a scancodes graphic which shows the number that represents each key on the keyboard.
for example Right Alt key ( remember there are 2 keys of some and they require a number for each )
anyway the alt key on the right is 184
so we could use
if altkey()=1 then print "rapidfire"
or if keystate(184) = 1 then print "rapidfire"
I think its best u write down the theory and ideas like this then head over to www.dbheaven.com as it has many aspects talked about here like simple basics and a few neat tricks.
It will have some timer examples also and 2d display and interaction which is basically the shell of what u need.
good luck have fun !