(MySql) input line too long
#4

Quote:
Originally Posted by goldspy98
View Post
Thanks the suggestion but even I change the PlayerQuery to PlayerQuery[999][MAX_PLAYERS] (Only for test) and have the same error.
Why are you using PlayerQuery[999][MAXPLAYERS]?
Try defining
pawn Code:
new SQLQuery[2048]; //(I know it's too big) at the top of your script
and then use it for your queries. See if that still happens. I don't think it makes much sense to use that PlayerQuery you're using for each player since it's just a server string that gets sent to SQL.
Then to free your string you can use:
pawn Code:
SQLQuery[0] = 0; //(Before you format it, of course.)
mysql_format(mysqlConnectHandle, SQLQuery, sizeof(SQLQuery), "INSERT INTO `playerinfo` (`ipAdress`, `name`, `password`, `admin`, `moderator`, `vip`, `credits`, `language`, `timeMuted`, `timeJailed`, `banned`, `skin`, `spawnInterior`) VALUES ('%s', '%e', sha1('%e'), '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i')", PlayerInfo[playerid][ipAdress], PlayerInfo[playerid][name], PlayerInfo[playerid][password], PlayerInfo[playerid][admin], PlayerInfo[playerid][moderator], PlayerInfo[playerid][vip], PlayerInfo[playerid][credits], PlayerInfo[playerid][language], PlayerInfo[playerid][timeMuted], PlayerInfo[playerid][timeJailed], PlayerInfo[playerid][banned], PlayerInfo[playerid][skin], PlayerInfo[playerid][spawnInterior]);
mysql_tquery(mysqlConnectHandle, SQLQuery, "", "");
If possible tell me what parameters mysql_tquery accepts since that may be part of the problem as well.
Reply


Messages In This Thread
(MySql) input line too long - by goldspy98 - 20.11.2013, 20:11
Re: (MySql) input line too long - by InglewoodRoleplay - 20.11.2013, 21:01
Re: (MySql) input line too long - by goldspy98 - 20.11.2013, 21:30
Re: (MySql) input line too long - by InglewoodRoleplay - 20.11.2013, 21:49
Re: (MySql) input line too long - by goldspy98 - 20.11.2013, 22:01
Re: (MySql) input line too long - by InglewoodRoleplay - 20.11.2013, 22:09
Re: (MySql) input line too long - by goldspy98 - 20.11.2013, 22:13
Re: (MySql) input line too long - by InglewoodRoleplay - 20.11.2013, 22:19
Re: (MySql) input line too long - by goldspy98 - 20.11.2013, 22:23
Re: (MySql) input line too long - by InglewoodRoleplay - 20.11.2013, 22:26

Forum Jump:


Users browsing this thread: 1 Guest(s)