kiwibrit - 9:53 pm on Oct 5, 2011 (gmt 0)
I have two tables within a database.
The first is 'clicks'
It has four fields:
The second table is 'downloads'
It has two fields:
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.