Sounds like you set a primary key without setting that key to auto_increment:
You will either need to handle the key increment yourself -- or alter the table to make the id auto_increment'ed.testdb> create table foo(id int unsigned not null, bar varchar(32), pr +imary key(id)); Query OK, 0 rows affected (0.01 sec) testdb> insert into foo(bar) values('foo'); Query OK, 1 row affected, 1 warning (0.00 sec) testdb> insert into foo(bar) values('bar'); ERROR 1062 (23000): Duplicate entry '0' for key 1
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: Database Error? DBD:MySQL:DB DO failed: Duplicate entry '0' for key '1' at
by jeffa
in thread Database Error? DBD:MySQL:DB DO failed: Duplicate entry '0' for key '1' at
by jdlev
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |