Problem with SQL query
#1

Hello.

I tried to make table that stores "Name" and "Level" of an Admin.

I just tried to update existing information in table with new but I cant get it to work.

Here is the code,I do not see what is wrong here (Maybe Im blind )

Код:
YCMD:makeadminslot(playerid, params[], help) 
{
	new id,level,slot,query[512],DB:base;
	if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, SIVAUB, "No");
	if(sscanf(params, "ii", id,slot)) return SendClientMessage(playerid, SIVAUB, "Use: /makeadminslot [id] [slot (1-20)]");

	level = PlayerInfo[id][pAdmin];


	base = db_open("base.db");

	format(query, sizeof(query), "UPDATE admins SET Name = %s WHERE Slot = %d", GetName(id),slot);


	db_query(base, query);
}
Reply


Messages In This Thread
Problem with SQL query - by Dolke - 18.03.2019, 17:44
Re: Problem with SQL query - by SymonClash - 18.03.2019, 20:49
Re: Problem with SQL query - by Banditul18 - 18.03.2019, 20:53
Re: Problem with SQL query - by Dolke - 19.03.2019, 05:59
Re: Problem with SQL query - by Banditul18 - 19.03.2019, 15:13
Re: Problem with SQL query - by Dolke - 19.03.2019, 20:21
Re: Problem with SQL query - by Dolke - 21.03.2019, 23:57

Forum Jump:


Users browsing this thread: 3 Guest(s)