Garage Creation: VIA mysql error
#8

This is what I'm doing.

Код:
mysql_tquery(g_iHandle,  "INSERT INTO `garages` (`ForSale`) VALUES(1)", "OnGarageCreated", "d", id);
Код:
public OnGarageCreated(gID)
{
	GarageInfo[gID][GID] = cache_insert_id(g_iHandle);
	Garage_Save(gID);
	return 1;
}
Код:
Garage_Save(gID)
{
	static
		query[2048];
	format(query,sizeof(query), "UPDATE `garages` SET `hID` = %d, `GarageOwner` = '%s', `GaragePosX` = %f, `GaragePosY` = %f, `GaragePosZ` = %f, `GaragePosA` = %f, `GarageIntX` = %f,`GarageIntY` = %f, `GarageIntZ` = %f, `GarageIntA` = %f, `VirtualWorld` = %d, `Interior` = %d, `Status` = %d, `ForSale` = %d, `Price` = %d WHERE `gID` = %d",
		GarageInfo[gID][GarageOwner],
		GarageInfo[gID][ExtX],
		GarageInfo[gID][ExtY],
		GarageInfo[gID][ExtZ],
		GarageInfo[gID][ExtA],
		GarageInfo[gID][IntX],
		GarageInfo[gID][IntY],
		GarageInfo[gID][IntZ],
		GarageInfo[gID][IntA],
		GarageInfo[gID][vWorld],
		GarageInfo[gID][IntID],
		GarageInfo[gID][Status],
		GarageInfo[gID][ForSale],
		GarageInfo[gID][Price],
		gID
	);
	return mysql_tquery(g_iHandle, query);
}
Код:
(error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''Nc' at line 1
Reply


Messages In This Thread
Garage Creation: VIA mysql error - by Tass007 - 28.04.2018, 02:58
Re: Garage Creation: VIA mysql error - by Logic_ - 28.04.2018, 02:59
Re: Garage Creation: VIA mysql error - by Zeth - 28.04.2018, 02:59
Re: Garage Creation: VIA mysql error - by Tass007 - 28.04.2018, 03:10
Re: Garage Creation: VIA mysql error - by Zeth - 28.04.2018, 03:12
Re: Garage Creation: VIA mysql error - by Tass007 - 28.04.2018, 03:17
Re: Garage Creation: VIA mysql error - by Zeth - 28.04.2018, 03:21
Re: Garage Creation: VIA mysql error - by Tass007 - 28.04.2018, 03:25
Re: Garage Creation: VIA mysql error - by Zeth - 28.04.2018, 03:35
Re: Garage Creation: VIA mysql error - by Tass007 - 28.04.2018, 03:42

Forum Jump:


Users browsing this thread: 3 Guest(s)