SA-MP Forums Archive
MySQL Error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Error (/showthread.php?tid=575150)



MySQL Error - SandKing94 - 24.05.2015

Code:
Код:
format(query,sizeof(query),"UPDATE players SET Faction = %d , FactionOwner = 1 WHERE Username = '%s'",fInfo[Factions][fIndex], CurrentFacOwner);
	mysql_function_query(Connection,query,false,"","");
Error:
Код:
[14:29:15] [DEBUG] mysql_tquery - connection: 1, query: "ptDATE players SET Faction = 52 , FactionOwner = 1 WHERE Usernam", callback: "(null)", format: "(null)"
[14:29:15] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[14:29:15] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[14:29: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 'ptDATE players SET Faction = 52 , FactionOwner = 1 WHERE Username = 'busternr'' at line 1
[14:29:15] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError



Re: MySQL Error - Vince - 24.05.2015

Your stack has been corrupted, seeing as part of the query string has been overwritten.


Re: MySQL Error - SandKing94 - 24.05.2015

But i hasnt been overwritten, i am using the query[200] once.


Re: MySQL Error - SandKing94 - 24.05.2015

Bump, i dont really know how to fix this


Re: MySQL Error - SandKing94 - 24.05.2015

B U M P


Re: MySQL Error - bgedition - 24.05.2015

Код:
format(query,sizeof(query),"UPDATE `players` SET `Faction` = '%d' , `FactionOwner` = 1 WHERE `Username` = '%s'",fInfo[Factions][fIndex], CurrentFacOwner);
I think now it will work fine.