herbal_lavender Posted December 22, 2005 Share Posted December 22, 2005 I am in need of assistance with this code. I'm attempting to make a table for a community. It seems everything is ok when I upload the .sql file except for this line. create table bugs(bugid bigint primary key auto_increment, memberid bigint references members, bugtext text, type integer, bugdate DATE) And this is what shows when I try to upload the file. 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 'create table bugs(bugid bigint primary key auto_increment, memb Could someone help me. Thanks. Herbal_Lavender Quote Link to comment Share on other sites More sharing options...
marker5a Posted December 22, 2005 Share Posted December 22, 2005 I ran your command on my server and got no error, so I dumped the table from my server and came up with this query: CREATE TABLE `bugs` ( `bugid` bigint(20) NOT NULL auto_increment, `memberid` bigint(20) default NULL, `bugtext` text, `type` int(11) default NULL, `bugdate` date default NULL, PRIMARY KEY (`bugid`) ) TYPE=MyISAM Give that a shot, and let us know how it works Chris Quote Link to comment Share on other sites More sharing options...
fenway Posted December 23, 2005 Share Posted December 23, 2005 It's possible that you're trying to run that code on a server that doesn't have complete foreign key reference support for InnoDB table, so the parser is throwing the error. Using the CREATE TABLE syntax posted above -- as a MyISAM table -- should resolve your problem. 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.