You can do it the old fashioned way… with an SQL statement that looks something like this
ALTER TABLE table_name ADD CONSTRAINT fk_foreign_key_name FOREIGN KEY (foreign_key_name) REFERENCES target_table(target_key_name);
This assumes the keys already exist in the relevant table
Related Posts:
- importing a CSV into phpmyadmin
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- Error establishing a database connection (Set-up locally)
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- PHP Connection failed: SQLSTATE[HY000] [2002] Connection refused
- Authentication plugin ‘caching_sha2_password’ cannot be loaded
- PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP
- what does “/index.php?admin/admin_dashboard” in my url mean
- How to get size of mysql database?
- difference between primary key and unique key
- Creating a search form in PHP to search a database?
- MySQL Error #1133 – Can’t find any matching row in the user table
- How can I prevent SQL injection in PHP?
- phpmyadmin #1045 Cannot log in to the MySQL server. after installing mysql command line client
- MySQL Daemon Failed to Start – centos 6
- Error: Duplicate entry ‘0’ for key ‘PRIMARY’
- MySQL – count total number of rows in php
- Data is not constantly loading from custom wordpress table
- Check if post of title already exists
- $wpdb->delete column values IN ARRAY()?
- What specific database privileges does WordPress need?
- “#1067 – Invalid default value for ‘post_date'” when trying to reset AI after backup
- Changing user_nicename
- Does WordPress cache get_user_meta() results?
- WordPress will not operate correctly
- How to Join two tables from separate databases within WordPress
- error importing localhost export file to server
- How to sort results from a custom database table
- How to copy post titles to post slug in phpmyadmin
- Delete all post meta except featured image
- Export only pages and posts with mysql dump
- Import 10,000 Users into WordPress WITH a specific ID for each user
- How to do a MySQL dump from production site without using a search and replace script for local development?
- WP database error for comments_popup_link()
- if statement on database query
- Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error
- No wp-config.php file on local install of wordpress – site still displays
- Set Display Name to first and last name (phpmyadmin SQL Query)
- Recent comments from my blogs only
- How to Create a Admin User for A WordPress Site via MySQL (PHPMyAdmin)?
- Different database query in function.php using mysqli
- Delete all post meta except featured image Using SQL
- How to write one comment and publish on every post using database or plugin?
- SQL error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’ [closed]
- Adding custom tables to WordPress
- phpMyAdmin displays error when importing database
- Set meta_key and meta_value for all registered user in wordpress using sql query [closed]
- Can’t find my wordpress DB in phpmyadmin
- Create WP_Query to search for posts by their categories or their parent/child categories
- WordPress database import: Row size too large
- How to display data from custom table in wordpress phpmyadmin
- Is it possible to create a wordpress database with php code?
- Update results, Before deleting the related category [closed]
- How to import a custom MySQL DB table into a WordPress custom post type
- Will changing the folder name two directories above a fresh wordpress installation break the site?
- database sent to a JSON file
- $wpdb to insert html form information
- inserting a post from an extern php file but post content doesn’t show on wp site
- Not connecting to database in file with multiple MySQL connections
- wpdb prepare insert table doesn’t work
- Should I use WordPress to skin a database website?
- I can’t update my data through $wpdb
- Getting Error Trying to Create Table
- Export Yoast Keywords from MySQL/phpMyAdmin
- Adding data to custom wordpress database table
- How Do I Delete WordPress Posts Older Than 400 Days, From A WordPress Category
- List users with the most posts in the last 30 days
- Add row to custom database Table and delete all rows older than 1 day
- Installing local to live WP into subdirectory
- select a single val though a table in wordpress
- How to display results from a data table with an encrypted user id?
- add_action for publish_post doesn’t work
- Mysql Server keeps crashing
- Please help! I have a problem with getting wordpress databas
- Cant create table on plugin activation
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- I imported an restore an database and It shows #1067 – Invalid default value for ‘user_registered’
- How to bulk delete a certain part of all wordpress posts
- When I add metadata, metavalue length is added in to the value in some cases
- Deleted products from woocommerce are still in the database
- Moving a few select DB tables to a new WP instance
- Using wpdb to connect to a different database is not working
- PHP Warning: mysqli_error(): Couldn’t fetch mysqli in
- Can I disable auto increment of WordPress Posts Database to utilize previously deleted records?
- Insert data from form to database
- An SQL query to find orphaned image attachments and their meta
- can’t delete a row from post_meta table
- Missing latest posts and options after DB migration via phpMyAdmin
- Check if a database is well installed
- How to set max users to 17.000
- two wordpress sites, two themes, one database, same content
- How to connect database table to each registered wordpress user.
- MySQL database migration to WordPress
- Custom query_posts() parameter
- cannot log in to the mysql server (wamp and wordpress)
- SQL command to export post_content from wp_posts using phpMyAdmin
- Need SQL query to find&replace image URL
- Execute multiple PHP Snippets causes error?
- Can’t insert into a database wordpress