Creating foreign keys in phpmyadmin?
Posted by: rpjd (37.228.242.---)
Date: September 27, 2017 04:06AM

I wanted to create a table in phpmyadmin with two columns, each column being a foreign key to primary keys in others tables. In the Structure tab of phpmyadmin, there are only Primary and Unique indexes available to choose from that I can see/find. As I could not find a Foreign Key option in phpmyadmin, I created the table in MySQL console. If there is no Foreign Key index available in the Structure tab, will it be introduced?

Re: Creating foreign keys in phpmyadmin?
Posted by: Otomatic (Moderator)
Date: September 27, 2017 09:37AM

Hi,

You have to create table with Storage engine = InnoDB

This question is not On Topic
This site is for people having issues getting WAMPServer running and not a general HOW DO I site for everything web related.

For this kind of questions you should consult the relevant documentation, in this case, that of MySQL.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.7 32 bit - Apache 2.4.38 - PHP 7.3.2/7.2.15/7.1.26/7.0.33/5.6.40 - MySQL 5.7.25 - MariaDB 10.3.13
Wampserver 3.1.7 64 bit - Apache 2.4.38 - PHP 7.3.2/7.2.15/7.1.26/7.0.33/5.6.40 - MySQL 5.7.25/8.0.14 - MariaDB 10.3.13
PhPMyadmin 4.8.5 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Sorry, only registered users may post in this forum.