Hi,
guess what? I need some help 😉!
i have to tables in my database (mysql)
now i want to fetch some data out of it.
i use a random() select.
the problem is that i have to join with a datafield in the second database which i dont know.
i have a database full with questions.
and one which controlls if a question was already presentet to the user.
the table which controlls that looks like this
session | question1 | question2 | question3 | ...
xyz | 1 | 0 | 0 | ...
1 means already presented to user
0 means not presented
the table with the questions like this
id | question
now with the random select i don't know which question will be fetched out of the db. so how can i check if the question was already presented in one mysql select statement?
SELECT * FROM questions,qcontroll WHERE qStat='1' AND qcontroll.cSess='$sid' AND qcontroll.question??UNKONOWN??='0' ORDER BY RAND() LIMIT 1
Understand what i mean?
thx 4 help