spires Posted December 13, 2011 Share Posted December 13, 2011 CREATE TABLE IF NOT EXISTS `admin_emails_desc` ( `id` BIGINT( 11 ) NOT NULL AUTO_INCREMENT , `admin_emails_id` BIGINT( 11 ) NOT NULL DEFAULT '', `lang_id` BIGINT( 11 ) NOT NULL DEFAULT '', `name` VARCHAR( 150 ) NOT NULL DEFAULT '', `subject` VARCHAR( 150 ) NOT NULL DEFAULT '', `body_content` TEXT NOT NULL , `from_name` VARCHAR( 150 ) NOT NULL DEFAULT '', `from_email` VARCHAR( 250 ) NOT NULL DEFAULT '', PRIMARY KEY ( `id` ) , FOREIGN KEY ( `admin_emails_id` ) , FOREIGN KEY ( `lang_id` ) ) ENGINE = MYISAM AUTO_INCREMENT =1 MySQL said: #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 ' FOREIGN KEY (`lang_id`) ) ENGINE=MyISAM AUTO_INCREMENT=1' at line 11 Quote Link to comment Share on other sites More sharing options...
mikosiko Posted December 13, 2011 Share Posted December 13, 2011 Can you see the syntax error ? Yes... incomplete FOREIGN KEY constraint http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.