Hello,
I am making a little survey system. I have 4 tables.
Users: has userID.
Questions: Has questionID
Answers: Has andswerID
Finished: has userID, questionID, etc.
On form call, I need to get all questions from the Questions DB then see what the user has answered already so I can display the rest.
Is there a good way to do this that does not involve a load of sql calls?
The only way I can think to do it is put questionsID in one array then answered questions ID in another array then loop and compare,etc..
I am sure there is a cleaner faster way or is there not?
Thanks.
I am making a little survey system. I have 4 tables.
Users: has userID.
Questions: Has questionID
Answers: Has andswerID
Finished: has userID, questionID, etc.
On form call, I need to get all questions from the Questions DB then see what the user has answered already so I can display the rest.
Is there a good way to do this that does not involve a load of sql calls?
The only way I can think to do it is put questionsID in one array then answered questions ID in another array then loop and compare,etc..
I am sure there is a cleaner faster way or is there not?
Thanks.