It has four fields: Name: fil_id type: int(10) PRIMARY KEY
Name: customer_id type: int(4)
Name:location Type: varchar(100)
Name: uniqid Type: varchar(15)
The second table is 'downloads'
It has two fields:
Name: customer_id Type: int(4) PRIMARY KEY
Name: username Type: varchar(35)
When I run the following SQL in phpmyadmin
ALTER TABLE clicks ADD FOREIGN KEY (customer_id) REFERENCES downloads(customer_id) SHOW ERRORS
I get an error #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW ERRORS' at line 1
I've looked at this one quite intensively. As the tables hold no data I could just drop them and recreate, including the foreign key. But I would like to nail the problem and I just can't figure it. Can you help?
I am running MySQL 5.07 locally on my Windows 7 PC.