Alendar Posted February 10, 2008 Share Posted February 10, 2008 When trying to execute this code: CREATE TABLE `pastebin` ( `pid` int(11) NOT NULL auto_increment, `poster` varchar(16) default NULL, `posted` datetime default NULL, `code` text, `parent_pid` int(11) default '0', `format` varchar(16) default NULL, `codefmt` mediumtext, `codecss` text, `domain` varchar(255) default '', `expires` DATETIME, `expiry_flag` ENUM('d','m', 'f') NOT NULL DEFAULT 'm', PRIMARY KEY (`pid`), KEY `domain` (`domain`), KEY `parent_pid`, KEY `expires` ); I get the following 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 ' KEY `expires` )' at line 16I am trying to install PasteBin an open source code. Yet I get this error when trying to install this part. Thanks for the help!Alendar Link to comment Share on other sites More sharing options...
justsomeguy Posted February 11, 2008 Share Posted February 11, 2008 It's expecting something else after this line:KEY `parent_pid`,That tells it what the index name is called but not what columns to use for the index.http://dev.mysql.com/doc/refman/5.0/en/create-table.html Link to comment Share on other sites More sharing options...
Alendar Posted February 11, 2008 Author Share Posted February 11, 2008 I was able to fix this by changing the last two lines to this: KEY (`parent_pid`),KEY (`expires`) This problem is resolved. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.