cursed Posted January 11, 2008 Share Posted January 11, 2008 An error appears when I run the following mySQL statement.. CREATE TABLE `actions` ( `id` int(10) unsigned NOT NULL auto_increment, `actionid` tinyint(3) unsigned NOT NULL default '0', `playerid` smallint(6) NOT NULL default '0', `time` datetime NOT NULL default '0000-00-00 00:00:00', `map` tinyint(3) unsigned NOT NULL default '0', `xpos` smallint(5) unsigned NOT NULL default '65535', `ypos` smallint(5) unsigned NOT NULL default '65535', `parameters` varchar(255) collate latin1_general_ci NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; and the error message.. #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 'collate latin1_general_ci NOT NULL default '', PRIMARY KEY my mySQL version is 4.0.27-standard. Help would be appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/85464-mysql-error-wrong-syntax/ Share on other sites More sharing options...
toplay Posted January 11, 2008 Share Posted January 11, 2008 I tried your create on MySQL v5+ and it worked fine as-is. Try removing the "collate latin1_general_ci" before the NOT NULL (you already have collate set for whole table). Look in the manual for the correct syntax: http://dev.mysql.com/doc/refman/4.1/en/create-table.html Quote Link to comment https://forums.phpfreaks.com/topic/85464-mysql-error-wrong-syntax/#findComment-436240 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.