MySql に 3 つのテーブルがあります。表 1 には次のフィールドがあります。
表1:
EventType
-etid
-description
表 2:
EventAsks
-etid
-qid
表 3:
Questions
-qid
-textofquestion
特定の etid があり、イベントが要求するすべての質問を見つけたい場合。したがって、次の表が与えられます...
EventType
etid description
1 hiking
2 biking
EventAsks
etid qid
1 1
1 3
2 2
2 3
Questions
qid textofquestion
1 Is it fun?
2 Is it lots of exercise
3 Is it expensive
したがって、与えられた etid の結果は etid=1 であり、etid=1 に関連付けられた質問が返されることを望みます...
Result
Is it fun?
Is it expensive?
これは結合に関係していると確信していますが、正確な方法がわかりませんか? 助言がありますか?