Duplicate entry - MySQL
#1

I don't know why, but I always get this error when trying to save player's stats into the database.
The table has a total number of 39 columns (user stats), Most of the values are 0 [zero] like AdminLevel, Maths won, Derby won, etc. I don't get errors on those columns.
I recently created 2 new columns in the table (i.e. Arrests, Robberys). Since then, I always get errors while trying to save the player's stats "Error ID: 1062, Duplicata du champ '0-0' pour la clef 'Arrests'"
I don't know why it just shows it on this column and not on the old columns

Could someone help me please?
Reply
#2

They're always meant to be set to 0.
And yes, most of the columns are unique..
Consider that a user registers, and he has 0 arrests, 0 robbers, 0 fallout wins and then a user register registers again, now this user is not inserted into the database.
I also found this: The older columns doesn't give problems, ONLY the columns which I've added recently is producing this error.
Reply
#3

So, I shouldn't make the new columns as unique then?
Reply
#4

Ah, Now I get it!
Thanks, mate! *hug*
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)