mySQL error: duplicate entry '127' for key
August 03, 2007
Dreamweaver | PHP | Web Building

While working on a php insert-record form I was getting the error:

#1062 - Duplicate entry '127' for key 1

although there were no other records with the id "127" - just the latest one.

Thanks to jc_armor for the answer to this:
"quick question, what's the Data Type of your ID field? It could be a reason that the data type can only handle up to 127 :) "

Changing the field type to "unsigned INT" as recommended in the forum message made the error disappear.">MySQL Reference Manual: data types: numeric types

Ads by Google

Posted by ellen at August 03, 2007 05:32 PM


Wow :O Thanks Man it was 4 or 5 hours i was working on this problem....
Thank you,,,,...

Regards, Bye

thanks man, i ll never use tinyint again haha

Gah, tinyint was the problem here too!

Ads by Google

 RSS   |   Contact Me

Ads by Google

Ads by Google