Raised This Month: $ Target: $400
 0% 

Level System trying to move to SQL Database


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-06-2023 , 18:46   Re: Level System trying to move to SQL Database
Reply With Quote #9

Quote:
Originally Posted by KerwinSweet2003 View Post
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.
__________________
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode