mystycs
02-05-2010, 04:33 AM
I am trying to create this table with this code
CREATE TABLE `vote` (
`voteNr` int(8) NOT NULL default ‘0’,
`voteValue` int(8) NOT NULL default ‘0’,
`imgId` varchar(100) NOT NULL default ‘’,
UNIQUE KEY `imgId` (`imgId`)
) TYPE=MyISAM;
But i am getting an error
SQL query:
CREATE TABLE `vote` (
`voteNr` INT( 8 ) NOT NULL DEFAULT‘0’,
`voteValue` INT( 8 ) NOT NULL DEFAULT‘0’,
`imgId` VARCHAR( 100 ) NOT NULL DEFAULT‘’,
UNIQUE KEY `imgId` ( `imgId` )
) TYPE = MYISAM
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 '‘0’,
`voteValue` int(8) NOT NULL default ‘0’,
`imgId` ' at line 2
How can i fix this issue? Is there something wrong in the mysql code?
CREATE TABLE `vote` (
`voteNr` int(8) NOT NULL default ‘0’,
`voteValue` int(8) NOT NULL default ‘0’,
`imgId` varchar(100) NOT NULL default ‘’,
UNIQUE KEY `imgId` (`imgId`)
) TYPE=MyISAM;
But i am getting an error
SQL query:
CREATE TABLE `vote` (
`voteNr` INT( 8 ) NOT NULL DEFAULT‘0’,
`voteValue` INT( 8 ) NOT NULL DEFAULT‘0’,
`imgId` VARCHAR( 100 ) NOT NULL DEFAULT‘’,
UNIQUE KEY `imgId` ( `imgId` )
) TYPE = MYISAM
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 '‘0’,
`voteValue` int(8) NOT NULL default ‘0’,
`imgId` ' at line 2
How can i fix this issue? Is there something wrong in the mysql code?
