General developer forum

how to link mdl_question to mdl_quiz in SQL

 
Picture of Chen PENG
Re: how to link mdl_question to mdl_quiz in SQL
 

I have solved it myself smile. it should link through mdl_quiz_slots.


Thanks


select q.* from mdl_question q

join mdl_quiz_slots qs

on qs.questionid = q.id

join mdl_quiz qz

on qz.id = qs.quizid

where qz.id=820

 
Average of ratings: -