Renault Clio 1.2 16v
Its a longshot, but is anyone here any good with MySQL? Ive got a project to do and have done most of it but one 'create table' is giving me some grief and ive got no idea how to fix it. Keeps coming up with:
#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 '( Del_List_ID ),
Constraint FK_Order_Line FOREIGN KEY (Del_List_ID) REFERENCES ' at line 12.
The create table looks like this:
CREATE TABLE Order_Line
(Line_ID INT(4) NOT NULL,
StOrd_ID INT(4) NOT NULL,
Del_List_ID INT(4) NOT NULL,
Filling_ID VARCHAR(30) NOT NULL,
Bread_ID VARCHAR(30) NOT NULL,
Quantity INT(3) NOT NULL,
Constraint Pk_Order_Line Primary Key(Line_ID),
INDEX ( StOrd_ID ),
Constraint FK_Order_Line FOREIGN KEY (StOrd_ID) REFERENCES Standing_Order( StOrd_ID ) ON DELETE CASCADE)
INDEX ( Del_List_ID ),
Constraint FK_Order_Line FOREIGN KEY (Del_List_ID) REFERENCES Delivery_List( List_ID ) ON DELETE CASCADE)
INDEX ( Filling_ID ),
Constraint FK_Order_Line FOREIGN KEY (Filling_ID) REFERENCES Filling( Filling_ID ) ON DELETE CASCADE)
INDEX ( Bread_ID ),
Constraint FK_Order_Line FOREIGN KEY (Bread_ID) REFERENCES Bread( Bread_ID ) ON DELETE CASCADE)
TYPE = INNODB;
Any help MUCH appreciated!
Chris.
#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 '( Del_List_ID ),
Constraint FK_Order_Line FOREIGN KEY (Del_List_ID) REFERENCES ' at line 12.
The create table looks like this:
CREATE TABLE Order_Line
(Line_ID INT(4) NOT NULL,
StOrd_ID INT(4) NOT NULL,
Del_List_ID INT(4) NOT NULL,
Filling_ID VARCHAR(30) NOT NULL,
Bread_ID VARCHAR(30) NOT NULL,
Quantity INT(3) NOT NULL,
Constraint Pk_Order_Line Primary Key(Line_ID),
INDEX ( StOrd_ID ),
Constraint FK_Order_Line FOREIGN KEY (StOrd_ID) REFERENCES Standing_Order( StOrd_ID ) ON DELETE CASCADE)
INDEX ( Del_List_ID ),
Constraint FK_Order_Line FOREIGN KEY (Del_List_ID) REFERENCES Delivery_List( List_ID ) ON DELETE CASCADE)
INDEX ( Filling_ID ),
Constraint FK_Order_Line FOREIGN KEY (Filling_ID) REFERENCES Filling( Filling_ID ) ON DELETE CASCADE)
INDEX ( Bread_ID ),
Constraint FK_Order_Line FOREIGN KEY (Bread_ID) REFERENCES Bread( Bread_ID ) ON DELETE CASCADE)
TYPE = INNODB;
Any help MUCH appreciated!
Chris.