[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: ERROR 1062: Duplicate entry '1' for key 1
Pls ignore - the answer is that the table is corrupt.
Sorry.
H
> -----Original Message-----
> From: Hugh Saunders [mailto:hugh@xxxxxxxxxxxxx]
> Sent: 02 January 2001 11:06
> To: mysql@xxxxxxxxxxxxxxx
> Subject: ERROR 1062: Duplicate entry '1' for key 1
>
>
> Dear all,
>
> I'm getting this error from a CGI script (Perl and DBI, but
> it's definitely
> NOT DBI). My table is this:
>
> Field Type
> id INTEGER(11) AUTO_INCREMENT PRIMARY KEY
> item_id INTEGER(11)
> category_id INTEGER(11)
>
> I'm using mySQL version 3.21.33b under Debian Linux.
>
> The SQL that causes this error is:
>
> INSERT INTO item_category (item_id, category_id) VALUES (nnnn, nnnn);
>
> This fails with the above error both via CGI and if I enter
> the command
> manually. It seems to me that mySQL has stopped
> auto-incrementing, but I
> don't understand why? There are about 2500 records in the
> table, and there
> is a record id=1, and the id numbers do not run continuously,
> that is, some
> records have been deleted.
>
> Help!!
>
> Thanks
>
> Hugh
>
>
> --
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/documentation/manual.php" before
> posting. To request this thread, e-mail
> mysql-thread60370@xxxxxxxxxxxxxxx
>
> To unsubscribe, send a message to:
> <mysql-unsubscribe-hugh=proteus.co.uk@xxxxxxxxxxxxxxx>
>
> If you have a broken mail client that cannot send a message to
> the above address (Microsoft Outlook), you can use:
> http://lists.mysql.com/php/unsubscribe.php
>
>
>
--
---------------------------------------------------------------------
Please check "http://www.mysql.com/documentation/manual.php" before
posting. To request this thread, e-mail mysql-thread60371@xxxxxxxxxxxxxxx
To unsubscribe, send a message to:
<mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
If you have a broken mail client that cannot send a message to
the above address (Microsoft Outlook), you can use:
http://lists.mysql.com/php/unsubscribe.php
This mailing list archive is a service of Copilot Consulting.