Mysql_format
#7

Why so much spacing and ` or ' around every single one? Query's length can be reduced and splitting the arguments will get rid of the error:
pawn Код:
mysql_format(g_SQL, query, sizeof(query), "UPDATE players SET admin=%d,owner=%d,scripter=%d,donator=%d,regularplayer=%d,dj=%d WHERE id=%d LIMIT 1",
PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pOwner],PlayerInfo[playerid][pScripter],PlayerInfo[playerid][pDonator],PlayerInfo[playerid][pRegularPlayer],PlayerInfo[playerid][pDj],PlayerInfo[playerid][pID]);
and for your first question: 100+ arguments crashed the compiler. "format" gives an error if I'm not wrong but you will never need that many arguments at once.
Reply


Messages In This Thread
Mysql_format - by AroseKhanNiazi - 12.06.2015, 19:10
Re: Mysql_format - by bgedition - 12.06.2015, 19:21
Re: Mysql_format - by AroseKhanNiazi - 12.06.2015, 19:22
Re: Mysql_format - by bgedition - 12.06.2015, 19:26
Re: Mysql_format - by AroseKhanNiazi - 12.06.2015, 19:30
Re: Mysql_format - by AroseKhanNiazi - 12.06.2015, 20:39
Re: Mysql_format - by Konstantinos - 12.06.2015, 20:45
Re: Mysql_format - by AroseKhanNiazi - 12.06.2015, 20:53
Re: Mysql_format - by Vince - 12.06.2015, 20:55
Re: Mysql_format - by AroseKhanNiazi - 12.06.2015, 20:57

Forum Jump:


Users browsing this thread: 1 Guest(s)