As id
is the primary key, you cannot have different rows with the same value. Try to change your table so that the id
is auto incremented:
id int NOT NULL AUTO_INCREMENT
and then set the primary key as follows:
PRIMARY KEY (id)
All together:
CREATE TABLE card_games (
id int(11) NOT NULL AUTO_INCREMENT,
nafnleiks varchar(50),
leiklysing varchar(3000),
prentadi varchar(1500),
notkunarheimildir varchar(1000),
upplysingar varchar(1000),
ymislegt varchar(500),
PRIMARY KEY (id));
Otherwise, you can indicate the id
in every insertion, taking care to set a different value every time:
insert into card_games (id, nafnleiks, leiklysing, prentadi, notkunarheimildir, upplysingar, ymislegt)
values(1, 'Svartipétur', 'Leiklysingu vantar', 'Er prentae í: Tórarinn Guemundsson (2010). Spilabókin - Allir helstu spilaleikir og spil.', 'Heimildir um notkun: árni Siguresson (1951). Hátíeir og skemmtanir fyrir hundrae árum', 'Aerar upplysingar', 'ekkert hér sem stendur' );
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…