0

您好我正在尝试在 phpMyAdmin 中创建两个数据库表之间的关系:

用户

用户 ID,用户名,用户密码

轮廓

profile_id , profile_name , profile_email , 个人资料地址 , user_id

单击创建关系按钮后,系统会要求我创建一个引用键,然后单击 USERS 表 user_id。之后,我被要求设置一个外国 id 并选择配置文件 user_id。接下来会出现一个带有两个按钮和一个标签的框,上面写着“创建关系”以及“确定”和“取消”按钮。我单击“确定”按钮但没有任何反应。我已经尝试这样做了十几次,但没有成功。

怎么了?

4

1 回答 1

1

The information surrounding the question is a bit weak, what storage engine is used etc. But I had a similar problem just now and the reason for it not working was because the referring key did not have an index. Usually this is handled automatically (I think phpMyAdmin is responsible for this but I do not know) but in some cases one will manually have to add the index to make it work.

于 2013-07-26T12:02:38.983 回答