Hi guys
i got this query:
select question_id, question from table questions q where module_id ='$module' order by rand();
which i need to modify to also do the following
select question_id, question from table questions q WHERE module_id ='$module' and the field "required" = "YES" and WHERE the field (number_of_questions) from another table called tests where test_id='$test' then do an order by rand()
how can i change this into proper sql syntax?
here is the table structure if any one needs it.....
table questions
question_id
module_id
required
mark value
question type
question
answer
alt_answer1
alt_answer2
alt_answer3
notes
table tests
test_id
module_id
description
Notes
number_of_questions
start_date
end_date
group_id
any help with this would be great