Ah thank you, I am currently viewing this page: http://dev.mysql.com/doc/refman/5.5/...nstraints.html
and found what you typed there.
When you say giving the CONSTRAINT a name, is [symbol] where you put your name?
Using mysql version 5.5 and it's telling me I have a syntax error near
'REFERENCES products(productID) ) ENGINE=INNODB' at line 1'
...Not sure why as I already have my products table setup and ready, and the syntax looks to be right according to that website.
Here is what I am typing in:
CREATE TABLE product_images ( imgID INT AUTO_INCREMENT PRIMARY KEY, productID INT, imgName VARCHAR(50), CONSTRAINT FOREIGN KEY (productID) REFERENCES products(productID) ON CASCADE DELETE) ENGINE=INNODB;
Can you spot any issues?