#1062 - Duplicate entry '127' for key 1

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
warriors2003
Forum Commoner
Posts: 38
Joined: Wed Mar 24, 2004 7:24 pm

#1062 - Duplicate entry '127' for key 1

Post by warriors2003 »

Hey guys, I'm going along inserting data in a table,,then I get this error out of nowhere in mysql

#1062 - Duplicate entry '127' for key 1

I did some searching, can't quite figure out the problem. Now I can't get past the point of enerting more data. Their are no dupcliate field names or ID's. (ID was auto, but didn;t give me any problems before this)
How can I fxi this??

Thanks in Advance
danyprundus
Forum Newbie
Posts: 4
Joined: Sun Mar 28, 2004 8:10 pm

Post by danyprundus »

Didn't you by any changes already added some data in thad database?
Check your sql quesry and your database.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Your column type is a tinyint which only allows values from -127 to 127, change it to an int and all will be well ;)
Post Reply