简体   繁体   中英

WordPress users table - getting error while adding foreign key

imagine i want to save more information about each user in 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 .

but in phpmyadmin tool when I want to create this relation, I get this error:

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 . my problem is wordpress.
please help me. how can I fix this ?

您必须确保使用InnoDb作为表格格式

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM