Forum Moderators: coopster

Message Too Old, No Replies

Duplicate entry in mySQL

Get Duplicate entry error but record does not exist !

         

Majid

10:12 am on Dec 10, 2005 (gmt 0)

10+ Year Member



Hi,

I have a big problem!

When I am trying to insert a record to my database I get this error:
Duplicate entry '17866' for key 1

but when I check my database from phpMyAdmin I dont have any record with this ID.
show me 17866 for Next Autoindex in Row Statistics section too.

What's the problem?

Thanks
Majid

dmorison

10:19 am on Dec 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The table might have become borked.

Worth running a myisamchk from the command line.

[dev.mysql.com...]

If you don't have shell access on your server you can also perform maintenance through SQL statements:

[dev.mysql.com...]

...and also through PHPMyAdmin; if you go to the "Operations" tab for the table you can run the maintenance queries from there.

Majid

5:06 pm on Dec 10, 2005 (gmt 0)

10+ Year Member



Thanks,
The problem was solved :)