Duplicate entry '72' for key 'PRIMARY' ??

C++, C#, Java, PHP, ect...
Post Reply
tomtefan
Posts: 46
Joined: Tue Jun 22, 2010 12:46 pm

Duplicate entry '72' for key 'PRIMARY' ??

Post by tomtefan »

I get that error when i...
Have a ring in the bag already, and try to buy another one (other id or similar).. or a new necklace.

I have them both to be in the playerjewelry DB.

BUT the rings have ID from 1 - 15. Rings have Location of Finger.
Amulets / Necklace have ID from 100+ Have Location of Neck.


I used the: or die( mysql_error() ); i got from chris. wich is a good thing.

But i have no clue what this error means.


Duplicate entry 72, must be the ID of the player, For the test char is ID 72 in DB.

But key PRIMARY. ???


Sidenote: i have more or less exact the same coding for weapons and armors,
but those i can buy 1000´s of the same if i want and not get the error.
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Duplicate entry '72' for key 'PRIMARY' ??

Post by hallsofvallhalla »

you have the id field set as primary which means no duplication. if you don't have much in the bag you can delete the id field and re add it.
tomtefan
Posts: 46
Joined: Tue Jun 22, 2010 12:46 pm

Re: Duplicate entry '72' for key 'PRIMARY' ??

Post by tomtefan »

yey.. now i can buy 1000´s of the same ring if i want =))

TY
Post Reply

Return to “Coding”