SA-MP Forums Archive
problem with mysql help me! - 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: problem with mysql help me! (/showthread.php?tid=522488)



problem with mysql help me! - simo0000 - 27.06.2014

hello guys i have a RP GM work with mysql all features work perfect but when ibuy a house it doesn't saved i got this errors in server_log.txt help me plz
Код:
[21:03:11] [MySQL] Query Error - (ErrorID: 1064) (Handle: 1)
[21:03:11] [MySQL] Check mysql_log.txt to review the query that threw the error.
[21:03:11] Dumping query from 2014/6/27 (21:3:11)

Description: 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 '`Lock`=1, `Rentable`=0, `RentFee`=10000, `Value`=150000, `SafeMoney`=0, `Pot`=0,' at line 1 (index 0). Query:


[21:03:11]  `Lock`=1, `Rentable`=0, `RentFee`=10000, `Value`=150000, `SafeMoney`=0, `Pot`=0, `Crack`=0, `Materials`=0, `Heroin`=0, `Weapons0`=0, `Weapons1`=0, `Weapons2`=0, `Weapons3`=0, `Weapons4`=0, `GLUpgrade`=0, `CustomInterior`=1, `CustomExterior`=0, `ExteriorA`=180.904403, `InteriorA`=184.843643, `MailX`=0.000000, `MailY`=0.000000, `MailZ`=0.000000, `MailA`=0.000000, `MailType`=0, `ClosetX`=0.000000, `ClosetY`=0.000000, `ClosetZ`=0.000000 WHERE `id`=842



Re: problem with mysql help me! - Konstantinos - 27.06.2014

Post the query was used (from the script).


Re: problem with mysql help me! - Juan.x - 27.06.2014

Put values in '', example: `Lock`= '1'


Re: problem with mysql help me! - simo0000 - 27.06.2014

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Post the query was used (from the script).
Код:
forward GetHomeCount(playerid);
public GetHomeCount(playerid)
{
	new string[128];
	format(string, sizeof(string), "SELECT NULL FROM `houses` WHERE `OwnerID` = %d", GetPlayerSQLId(playerid));
	return mysql_function_query(MainPipeline, string, true, "QueryGetCountFinish", "ii", playerid, 2);
}

forward AddReportToken(playerid);
public AddReportToken(playerid)
{
	new
		sz_playerName[MAX_PLAYER_NAME],
		i_timestamp[3],
		tdate[11],
		thour[9],
		query[128];

	GetPlayerName(playerid, sz_playerName, MAX_PLAYER_NAME);
	getdate(i_timestamp[0], i_timestamp[1], i_timestamp[2]);
	format(tdate, sizeof(tdate), "%d-%02d-%02d", i_timestamp[0], i_timestamp[1], i_timestamp[2]);
	format(thour, sizeof(thour), "%02d:00:00", hour);



Re: problem with mysql help me! - Konstantinos - 27.06.2014

It's a query with UPDATE clause, the above has nothing to do with it.


Re: problem with mysql help me! - simo0000 - 27.06.2014

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
It's a query with UPDATE clause, the above has nothing to do with it.
what can i do now?


Re: problem with mysql help me! - Konstantinos - 27.06.2014

Quote:
Originally Posted by simo0000
Посмотреть сообщение
what can i do now?
Post the correct query, otherwise no one can guess where's the syntax error..