MYSQL - input line too long (after substitutions)
#5

Quote:
Originally Posted by ThaCrypte
Посмотреть сообщение
Could you tell me what strins are?

Also about the two different queries; would it decrease performance?
https://sampwiki.blast.hk/wiki/Strins

Try in this way:

pawn Код:
new string[512];

    strins(string,"UPDATE `users` SET `IP`=%s`Admin`=%d,`Money`=%d,`Level`=%d,`Kills`=%d,`Deaths`=%d,`Warns`=%d,`Banned`=%d,`BannedReason`=%s,`BannedBy`=%s,",strlen(string));
    strins(string,"`Beta`=%d,`Faction`=%d,`FactionRank`=%s,`FactionRight`=%d, WHERE `ID`=%d",strlen(string));
    new query[512]; // this is line 664
    format(query, sizeof(query), string, IP[playerid], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pScores], PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pWarns],PlayerInfo[playerid][pBanned],PlayerInfo[playerid][pBanReason],PlayerInfo[playerid][pBannedAdminName],PlayerInfo[playerid][pBeta],PlayerInfo[playerid][pFaction], PlayerInfo[playerid][pFactionRank],PlayerInfo[playerid][pFactionRight], PlayerInfo[playerid][ID]);

    mysql_query(query);
If you use more queries it creates more lag because the server must search the ID of the player twice, but it's not very influent
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)