How to add foreign key PHPMYADMIN or MYSQL

Unknown Reply 3:25 PM
he innodb storage engine supports foreign keys in Mysql.


To create foreign keys in phpmyadmin :
1. Convert both tables into innodb, if they are not already.
2. View the structure of the table which will have a foreign key. Make the referencing field an INDEX.
3. Now come back to structure view and click Relation view.
Phpmyadmin Relation View Link
Phpmyadmin Relation View Link
In the Relation view page the field (which was made an INDEX) can be made a foreign key referencing to some other field in another table.
Phpmyadmin Foreign Key
Phpmyadmin Foreign Key
That should do it.

source : http://www.binarytides.com/create-foreign-key-phpmyadmin/

Related Posts

phpmyadmin 8519418102939553640
Comments
0 Comments
Facebook Comments by Media Blogger

Post a Comment

Search

Ikuti Channel Youtube Aku Yaa.. Jangan Lupa di subscribe. Terima kasih.

Popular Posts

Translate