Duplicate entry problem
Duplicate entry problem
I have a simple table that has an INT primary key that is set to auto-increment. It has one other VARCHAR field. Whenever I add a row, and then click off it to commit it, I get dialog that says "Duplicate entry '2' for key 1". The record is added, but it's not visible until I refresh the data. Is this a known issue, or does anyone know of a workaround for this?
Duplicate entry problem
I have the same problem. The message pops up every time I insert a new row - both to an empty table or to a table with records. Here is the table script:
CREATE TABLE cms.accounttypes (
accounttype_id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE,
accounttype VARCHAR(20) NOT NULL,
PRIMARY KEY (accounttype_id)
)
TYPE=InnoDB
AUTO_INCREMENT=4
(The table already has 3 records in it)
CREATE TABLE cms.accounttypes (
accounttype_id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE,
accounttype VARCHAR(20) NOT NULL,
PRIMARY KEY (accounttype_id)
)
TYPE=InnoDB
AUTO_INCREMENT=4
(The table already has 3 records in it)