SA-MP Forums Archive
Mysql update wrong information - 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: Mysql update wrong information (/showthread.php?tid=487450)



Mysql update wrong information - Privies - 13.01.2014

PHP код:
stock SaveAccount(playerid) { 
        if(
gPlayerLogged[playerid] == 1) { 
            
CheckMySQLConnection(); 
            new 
query[250],
            
sqlname[MAX_PLAYER_NAME],
            
sqlpass[64];
               
mysql_real_escape_string(playerVariable[playerid][Name], sqlname);
              
mysql_real_escape_string(playerVariable[playerid][Password], sqlpass);
              
format(querysizeof(query), "UPDATE `Accounts` SET `Nickname` = '%s', `Password` = '%s', `AdminLevel` = '%d', `Vip` = '%d', `Banned` = '%d', `Muted` = '%d', `MutedTime` = '%d', `Skin` = '%d', `Score` = '%d', `Money` = '%d' WHERE `ID` = '%i'",
            
sqlname,
            
sqlpass,
            
playerVariable[playerid][AdminLevel],
            
playerVariable[playerid][Vip],
            
playerVariable[playerid][Banned],
            
playerVariable[playerid][Muted],
            
playerVariable[playerid][MutedTime],
            
playerVariable[playerid][Skin],
            
playerVariable[playerid][Score],
            
playerVariable[playerid][Money],
            
playerVariable[playerid][ID]);
            
mysql_query(query); 
        }
        return 
1;

LOG:
Quote:

UPDATE `Accounts` SET `Nickname` = 'Privies', `Password` = '12345|1|0|0|0|0|0|0|0', `AdminLevel` = '1', `Vip` = '0', `Banned` = '0', `Muted` = '0', `MutedTime` = '0', `Skin` = '0', `Score` = '0', `Money` = '0' WHERE `ID` = '17'

In cell password mysql add more(part|1|0|0 and ect)
I dont have any idea why, help please


Re: Mysql update wrong information - Privies - 13.01.2014

Understood, close it.