[MySql Help] Get a value from db
#1

hm how can i get the level of player or name from the data base?
i tried:
Код:
stock IsPlayerAdminR(playerid)
{
    new playrname[24],str2[256];
	GetPlayerName(playerid,playrname,sizeof(playrname));
	format(str2,sizeof(str2),"SELECT `AdminLevel` FROM `rUsers` WHERE `Name`='%s'",playrname);
	new res=mysql_fetch_int(mysql_query(str2));
	return res;
}
bot this is doesn't work....
as you can see i new in all that MYSQL+PAWNO stuff...
Reply
#2

Quote:
Originally Posted by XePloiT
Посмотреть сообщение
hm how can i get the level of player or name from the data base?
i tried:
Код:
stock IsPlayerAdminR(playerid)
{
    new playrname[24],str2[256];
	GetPlayerName(playerid,playrname,sizeof(playrname));
	format(str2,sizeof(str2),"SELECT `AdminLevel` FROM `rUsers` WHERE `Name`='%s'",playrname);
	new res=mysql_fetch_int(mysql_query(str2));
	return res;
}
bot this is doesn't work....
as you can see i new in all that MYSQL+PAWNO stuff...
Why did you make yet another thread on this?
Reply
#3

well i don't need the another one because i started all of my system from the beginning to use mysql in them
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)