skippa Posted April 22, 2009 Share Posted April 22, 2009 i type this in CREATE TABLE `poker` ( `id` int(11) NOT NULL auto_increment, `player1` varchar(40) NOT NULL default '', `player2` varchar(40) default NULL, `player3` varchar(40) default NULL, `player4` varchar(40) default NULL, `cards1` varchar(250) default NULL, `cards2` varchar(250) default NULL, `cards3` varchar(250) default NULL, `cards4` varchar(250) default NULL, `money1` int(11) default '0', `money2` int(11) default '0', `money3` int(11) default '0', `money4` int(11) default '0', `deck` varchar(250) NOT NULL default '', `ante` int(16) NOT NULL default '0', `pot` int(16) NOT NULL default '0', `password` varchar(32) default NULL, `current` varchar(40) default NULL, `stage` int(1) default '0', `swapstart` int(1) NOT NULL default '0', `raiseamount` int(11) NOT NULL default '0', `currentraise` int(1) NOT NULL default '0', `maxraise` int(16) default NULL, `allin` binary(1) NOT NULL default '0', `lastmove` int(11) default NULL, `winners` varchar(250) NOT NULL default '', `created` int(11) NOT NULL default '0', `p1` varchar(100) NOT NULL default '', `p2` varchar(100) NOT NULL default '', `p3` varchar(100) character set latin1 collate latin1_spanish_ci NOT NULL default '', `p4` varchar(100) character set latin1 collate latin1_spanish_ci NOT NULL default '', `entry` varchar(100) NOT NULL default '',; PRIMARY KEY (`id`), UNIQUE KEY `player1` (`player1`,`player2`,`player3`,`player4`) and get this. #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 '' at line 33 Quote Link to comment Share on other sites More sharing options...
markjoe Posted April 22, 2009 Share Posted April 22, 2009 I can't say I fully understand this (I've pampered myself with a GUI for too long now), but the ; didn't look right, so I started there. Here's what I ended up with. CREATE TABLE `poker` ( `id` int(11) NOT NULL auto_increment, `player1` varchar(40) NOT NULL default '', `player2` varchar(40) default NULL, `player3` varchar(40) default NULL, `player4` varchar(40) default NULL, `cards1` varchar(250) default NULL, `cards2` varchar(250) default NULL, `cards3` varchar(250) default NULL, `cards4` varchar(250) default NULL, `money1` int(11) default '0', `money2` int(11) default '0', `money3` int(11) default '0', `money4` int(11) default '0', `deck` varchar(250) NOT NULL default '', `ante` int(16) NOT NULL default '0', `pot` int(16) NOT NULL default '0', `password` varchar(32) default NULL, `current` varchar(40) default NULL, `stage` int(1) default '0', `swapstart` int(1) NOT NULL default '0', `raiseamount` int(11) NOT NULL default '0', `currentraise` int(1) NOT NULL default '0', `maxraise` int(16) default NULL, `allin` binary(1) NOT NULL default '0', `lastmove` int(11) default NULL, `winners` varchar(250) NOT NULL default '', `created` int(11) NOT NULL default '0', `p1` varchar(100) NOT NULL default '', `p2` varchar(100) NOT NULL default '', `p3` varchar(100) character set latin1 collate latin1_spanish_ci NOT NULL default '', `p4` varchar(100) character set latin1 collate latin1_spanish_ci NOT NULL default '', `entry` varchar(100) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY (`player1`,`player2`,`player3`,`player4`)) 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.