Search code examples
phpmysqldatabasephpmyadminrelationships

How to enable relationships in PHPMyAdmin?


I know very little about MySQL, and PHPMyAdmin, I have am going to make a quiz program in PHP, it will allow the user(s) to create, save and do multiple choice quizzes.

The way in which the tables are currently structured (I'm open to suggestions, if this structure sounds rubbish:) ) I've got 3 tables, Quizzes containing:

 ID, quiz title and quiz_ID, 

Answers containing:

 ID, question_ID, Answer1, Answer2, Answer3, Answer4 and correct answer

Questions containing:

 ID, and the question.

I have absolutle no idea at all where to start in creating relationships to join ip various ID's. I am using PHPMyAdmin, and have looked around, and it says the relationship reature is disabled. So I think the first thing I need to do is enable this feature.

I would be so grateful for any help at all, and please explain it clearly because I'm pretty thick at all this :p

Thanks again in advance :) xx


Solution

  • In the structure view of a table you have a link just below the list saying "Relation view".

    Also make sure you have indexed the field you want to make relation on