Quote:
Originally Posted by KerwinSweet2003
Now I read again your message,I tried using REPLACE INTO,by doing that the error dissapears,but when the player gets xp,it just replaces the xp he got,it doesn't add +1 xp,it just replaces it instead of adding it.If you understood what I mean
|
Yes, that is how it works. It is essentially replacing the existing record. So you will need to know all existing info when using this.
Suppose current XP is 10 and you want to add 1 XP to the DB, when you use replace into, you would provide XP + 1.
Code:
REPLACE INTO tblStuff (SteamID, XP) VALUES ('%s', %d);" , szSteamID , CurrentXP + 1 );
If you are doing this only because you are losing data with nVault, you can simplify this by just fixing your nVault issue.
__________________