开发者

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 t开发者_Python百科o 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


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


Link to tutorial.

It is meant for use on a webserver, but it should help you further. If you can modifiy config.inc.php, you of course don't have to install pma again.

Please note that you can easily join tables using JOIN. See here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜