Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6683117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:47:01+00:00 2026-05-26T04:47:01+00:00

My list_items table has the following columns `ListID` `WordID` My lists table has a

  • 0

My list_items table has the following columns

  • `ListID`
  • `WordID`

My lists table has a primary, auto-incremented primary key `ListID`. I want to make the `ListID` in list_items a foreign key referencing the primary key in lists, but I get an error:

Error creating foreign key on `ListID` (check data types).

Both columns are int(8), and both table types are InnoDB. What could possibly be the issue?

Following these instructions has worked fine in setting up other foreign keys.

The only thing I can think of is on phpMyAdmin’s main screen, there’s a message:

“The additional features for working with linked tables have been deactivated. To find out why click here.”

But wouldn’t any issue there prevent me from setting up other foreign keys?

Relevant SQL:

--
-- Table structure for table `lists`
--

CREATE TABLE IF NOT EXISTS `lists` (
  ```ListID``` int(8) NOT NULL AUTO_INCREMENT,
  ```UserID``` int(8) NOT NULL,
  ```privacy``` varchar(25) NOT NULL,
  ```name``` varchar(50) NOT NULL,
  ```description``` text NOT NULL,
  ```date created``` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  ```date modified``` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (```ListID```),
  KEY ```UserID``` (```UserID```)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `lists`
--

--
-- Table structure for table `list_items`
--

CREATE TABLE IF NOT EXISTS `list_items` (
  ```ListID``` int(8) NOT NULL,
  ```WordID``` int(8) NOT NULL,
  KEY ```ListID``` (```ListID```),
  KEY ```WordID``` (```WordID```)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `list_items`
--

--
-- Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  ```UserID``` int(8) NOT NULL AUTO_INCREMENT,
  ```email``` int(50) NOT NULL,
  ```username``` int(25) NOT NULL,
  ```password``` int(25) NOT NULL,
  ```join date``` int(11) NOT NULL,
  PRIMARY KEY (```UserID```)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:47:01+00:00Added an answer on May 26, 2026 at 4:47 am

    you have an awful lot of backticks in your sql
    normally you would only have 1 set, that could be causing a problem

    example

    CREATE TABLE IF NOT EXISTS `list_items` (
      `ListID` int(8) NOT NULL,
      `WordID` int(8) NOT NULL,
      KEY `ListID` (`ListID`),
      KEY `WordID` (`WordID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that has the following 3 columns, ID, ShortCode, UploadDate. I
Given: A table named Table1 that has the following columns: ID ColumnA ColumnB Typing
MySQL 5.0.45 Table A has the following fields (columns): 1. transcation_id 2. client_name 3.
I have two database tables, 'Lists' and 'Notes'. Lists has columns _id, listname Notes
table structure is as following. item_id, item_name, dealer_id this table has a lot of
My app has an SQLite table with columns id , category and item_name .
Situation Say I have the following: a table items a table lists to which
I have a list on when items have been handed out. The table has
While my initial problem counting the running number of rows in a table has
Using the following database table structure: Order Table: OrderId OrderName OrderItem Table: OrderId ItemId

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.