Quote:
Originally Posted by nezo2001
Make it on two querys
PHP код:
stock SaveStatsForPlayer(playerid)
{
new query[700], query2[500];
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `IP`='%s', `Admin`=%d, `VIP`=%d, `Deaths`=%d, `Score`=%d, `Money`=%d, `MissionsPlayed`=%d, WHERE `ID`=%d", IP[playerid], pData[playerid][Admin], pData[playerid][VIP], pData[playerid][Deaths], GetPlayerScore(playerid), pData[playerid][Money], pData[playerid][MissionsPlayed]);
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `VipTime`=%d, `Warns`=%d, `Cookies`=%d, `Jailed`=%d, `Muted`=%d, `RegisterDate`=%d, `Duty`=%d, `Nopm`=%d WHERE `ID`=%d", pData[playerid][VipTime], pData[playerid][Warns], pData[playerid][Cookies], pData[playerid][Jailed], pData[playerid][Muted], pData[playerid][RegisterDate],pData[playerid][Duty], pData[playerid][Nopm], pData[playerid][ID]);
mysql_tquery(mysql, query, "", "");
mysql_tquery(mysql, query2, "", "");
}
If you still get the erroe try to take some from the one which you get the error from and put in the other
|
But you have one mistake,you have query in both formats,second one need to be query2,right?
Like this:
Код:
stock SaveStatsForPlayer(playerid)
{
new query[700], query2[500];
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `IP`='%s', `Admin`=%d, `VIP`=%d, `Deaths`=%d, `Score`=%d, `Money`=%d, `MissionsPlayed`=%d, WHERE `ID`=%d", IP[playerid], pData[playerid][Admin], pData[playerid][VIP], pData[playerid][Deaths], GetPlayerScore(playerid), pData[playerid][Money], pData[playerid][MissionsPlayed]);
mysql_format(mysql, query2, sizeof(query2), "UPDATE `players` SET `VipTime`=%d, `Warns`=%d, `Cookies`=%d, `Jailed`=%d, `Muted`=%d, `RegisterDate`=%d, `Duty`=%d, `Nopm`=%d WHERE `ID`=%d", pData[playerid][VipTime], pData[playerid][Warns], pData[playerid][Cookies], pData[playerid][Jailed], pData[playerid][Muted], pData[playerid][RegisterDate],pData[playerid][Duty], pData[playerid][Nopm], pData[playerid][ID]);
mysql_tquery(mysql, query, "", "");
mysql_tquery(mysql, query2, "", "");
}