[英]WordPress users table - getting error while adding foreign key
imagine i want to save more information about each user in wordpress
. 想象我想在
wordpress
保存有关每个用户的更多信息。 i create a table named users_information
, so i should create a user_id
column which is a foreign key for Wordpress
wp_users
table . 我创建了一个名为
users_information
的表,因此我应该创建一个user_id
列,该列是Wordpress
wp_users
表的外键。
but in phpmyadmin
tool when I want to create this relation, I get this error: 但是在
phpmyadmin
工具中,当我想创建此关系时,出现以下错误:
MySQL said:
#1215 - Cannot add foreign key constraint
I have tried many different ways but still I'm stuck. 我尝试了许多不同的方法,但仍然遇到困难。 you should also know that user_id is index and .
您还应该知道user_id是index和。 my problem is wordpress.
我的问题是WordPress。
please help me. 请帮我。 how can I fix this ?
我怎样才能解决这个问题 ?
您必须确保使用InnoDb作为表格格式
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.