Duplicate entry - MySQL - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Duplicate entry - MySQL (
/showthread.php?tid=538010)
Duplicate entry - MySQL -
biker122 - 19.09.2014
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?
Re: Duplicate entry - MySQL -
biker122 - 19.09.2014
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.
Re: Duplicate entry - MySQL -
biker122 - 19.09.2014
So, I shouldn't make the new columns as unique then?
Re: Duplicate entry - MySQL -
biker122 - 19.09.2014
Ah, Now I get it!
Thanks, mate! *hug*