Problems with MySQL saving
#1

I'm making a MySQL saving system, it's working completely fine so far. It's just that when I try to save the players health to the database, it puts all of that players variables, into all of the other players rows.

Код:
public OnPlayerDisconnect(playerid, reason)
{
	new query[128], Float:pos[3]; 
	GetPlayerPos(playerid, pos[0], pos[1], pos[2]); 

	mysql_format(mysql,query,sizeof(query), "UPDATE players SET Money='%d', Admin='%d', Skin='%d', Health='%f', PosX='%f', PosY='%f', PosZ='%f' WHERE ID='%d'",
		pMoney[playerid],
		pAdmin[playerid],
		pSkin[playerid],
		pHealth[playerid],
		pos[0],
		pos[1],
		pos[2],
		pID[playerid]);

	mysql_tquery(mysql,query,"","");
	return 1;
}
Again, it works as it should when I don't have the pHealth in there.. I'd very much appreciate some help with this.
Reply


Messages In This Thread
Problems with MySQL saving - by iamnotemmet - 23.11.2015, 22:22
Re: Problems with MySQL saving - by vassilis - 23.11.2015, 22:34
Re: Problems with MySQL saving - by iamnotemmet - 23.11.2015, 22:37
Re: Problems with MySQL saving - by Kalgon - 23.11.2015, 22:43
Re: Problems with MySQL saving - by vassilis - 23.11.2015, 22:45
Re: Problems with MySQL saving - by izeatfishz - 23.11.2015, 22:46
Re: Problems with MySQL saving - by iamnotemmet - 23.11.2015, 22:49
Re: Problems with MySQL saving - by zPain - 23.11.2015, 23:11
Re: Problems with MySQL saving - by iamnotemmet - 23.11.2015, 23:15
Re: Problems with MySQL saving - by PrO.GameR - 24.11.2015, 10:41

Forum Jump:


Users browsing this thread: 1 Guest(s)