Ho un problema quando eseguo questa query nel mio db :
INSERT INTO `buildings` ( `type` , `faction` , `name` , `requirements` , `input` , `output` , `duration` , `upkeep` , `description` )
VALUES ( 1, 1, 'Settore Foreste-Foresta', '', '25-10-30-20-10', '66-140-260-370-500-850-1000-1360-1580-1960', '0:02-0:08-0:16-0:48-1:15-2:18-3:24-5:45-9:00-14:50', '1-1-2-2-4-6-6-8-8-8', 'Attivando la lavorazione nelle foreste dei falegnami, avrai legna. Ampliando i livelli salirà la produzione di ogni ora' ) ;
Mi esce questo ;
#1062 - Duplicate entry '1-1' for key 1
perchè????
questo è quando creo la table buildings
CREATE TABLE IF NOT EXISTS `buildings` (
`type` int(10) unsigned NOT NULL default '0',
`faction` int(10) unsigned NOT NULL default '0',
`name` varbinary(45) NOT NULL,
`requirements` varbinary(128) NOT NULL,
`input` varbinary(128) NOT NULL,
`output` varbinary(128) NOT NULL,
`duration` varbinary(128) NOT NULL,
`upkeep` varbinary(128) NOT NULL,
`description` varbinary(512) NOT NULL,
PRIMARY KEY (`type`,`faction`),
UNIQUE KEY `Index_1` (`type`,`faction`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;