Duplicate entry '213' for key 'PRIMARY' [closed]

0

Where is the error? Duplicate entry '213' for key 'PRIMARY'

CREATE TABLE IF NOT EXISTS '%%PREFIX%%shipping_vars' (
  'variableid' int(11) NOT NULL auto_increment,
  'methodid' int(10) unsigned NOT NULL default '0',
  'zoneid' int(10) unsigned NOT NULL default '0',
  'modulename' varchar(100) NOT NULL default '',
  'variablename' varchar(100) NOT NULL default '',
  'variableval' text,
  'varvendorid' int unsigned NOT NULL default '0',
  PRIMARY KEY  ('variableid'),
  KEY 'modulename' ('modulename')
) TYPE=MyISAM  DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;

INSERT INTO '%%PREFIX%%shipping_vars' ('variableid', 'methodid', 'zoneid', 'modulename', 'variablename', 'variableval', 'varvendorid') VALUES
(213, 19, 1, 'shipping_correios', 'meios', '40010', 0),
(211, 19, 1, 'shipping_correios', 'senha', '', 0),
(212, 19, 1, 'shipping_correios', 'meios', '41106', 0),
(210, 19, 1, 'shipping_correios', 'id', '', 0),
(209, 19, 1, 'shipping_correios', 'displayname', 'Correios', 0),
(208, 19, 1, 'shipping_correios', 'is_setup', '1', 0);

To try to install this DB but of this error Duplicate entry '213' for key 'PRIMARY'.

    
asked by anonymous 30.12.2014 / 03:57

1 answer

1
CREATE TABLE IF NOT EXISTS '%%PREFIX%%shipping_vars' (

It is a command that is ignored if the table already exists, so what happens is this table already exists

And the insert values are already in the table, as you may have tried before.

If you check using phpmyadmin you will see that the data is already there.

If you want to reinstall, you will have to either clean the table, or delete it

    
30.12.2014 / 04:04