Small error
#1

I'm getting this:

Quote:

[04:49:15] [DEBUG] mysql_tquery - scheduling query "UPDATE `players` SET `VipTime`=0, `Warns`=3, `Cookies`=89, `Jailed`=0, `Muted`=0, `RegisterDate`=0, `Duty`=0, `Nopm`=0 WHERE `ID`=0"..
[04:49:15] [DEBUG] CMySQLQuery::Execute[()] - starting query execution
[04:49:15] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Regarding this line:

Код:
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`=%s, `Warns`=%d, `Cookies`=%d, `Jailed`=%d, `Muted`=%d, `RegisterDate`=%s, `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, "", "");
}
But i think i wrote it correctly...or no?
Reply


Messages In This Thread
Small error - by Face9000 - 27.09.2015, 09:21
Re: Small error - by itsCody - 27.09.2015, 09:34
Re: Small error - by Face9000 - 27.09.2015, 10:06
Re: Small error - by Face9000 - 27.09.2015, 21:07
Re: Small error - by itsCody - 27.09.2015, 21:53

Forum Jump:


Users browsing this thread: 3 Guest(s)