Hi,
There are three tables involved here.
A kind of quiz localhost site, i did for me.
Table 1 contains questions.
==========================
question_id (autoincrement)
questions (varchar 250)
category_id
Table 2 contains choices
========================
Choice_id (autoincrement)
Choice_value (varchar)
question_id
Table 3 contains answers
========================
question_id
choice_id
I am displaying 10 questions from every category
select * from questions where cat_id = 3 ORDER BY RAND() LIMIT 10
now i need to write 10 queries to display the choices.
select * from choice where question_id = xx
What is the better solution to reduce the query?