Proublems with MySQL query
#7

Quote:
Originally Posted by hanzen
Ok.. OnPlayerUpdate() is suppose to update som data in the database. I run this, but it wont insert into the table.
Код:
	new query[256];
	format(query, sizeof(query), "UPDATE players SET money = '%d', level = '%d', admin = '%d', skin = '%d', bank = '%d' WHERE name = '%s'",PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pBank]), PlayerInfo[playerid][pName];
	mysql_query(query, SQLPtr);
Dont use OnPlayerUpdate to save stats, its called way to frequently.


Edit:

The problem with the second one is that the ")" is in the wrong place.


BTW: is "PlayerInfo[playerid][pAdmin]" a string or an integer? Im thinking its a string, as you already have a variable for admin level, so change the corresponding %d's into %s's.
Reply


Messages In This Thread
Proublems with MySQL query - by hanzen - 26.05.2010, 21:55
Re: Proublems with MySQL query - by Kyosaur - 26.05.2010, 22:05
Re: Proublems with MySQL query - by hanzen - 26.05.2010, 22:06
Re: Proublems with MySQL query - by woot - 26.05.2010, 22:09
Re: Proublems with MySQL query - by Kyosaur - 26.05.2010, 22:14
Re: Proublems with MySQL query - by hanzen - 26.05.2010, 22:15
Re: Proublems with MySQL query - by Kyosaur - 26.05.2010, 22:18
Re: Proublems with MySQL query - by hanzen - 26.05.2010, 22:31
Re: Proublems with MySQL query - by hanzen - 26.05.2010, 23:02

Forum Jump:


Users browsing this thread: 1 Guest(s)