string GetGroupName(int playerid, short groupid)
{
try
{
//If putting back to non classified
if (groupid == 0) return "none";
//Get count of groups
int count = MsSQL.GetRowsCount("SELECT * FROM friends_groups WHERE playerid='" + playerid + "'");
//Do for each count
for (int i = 0; i <= count + 1; i++)
{
//If the group id equals the i return the name value
if (i == groupid)
{
//Get groupname from db
string groupname = MsSQL.GetData("SELECT groupname FROM friends_groups WHERE playerid='" + playerid + "'", "groupname");
//Return the groupname string value
return groupname;
}
}
//Def return none
}
catch (Exception ex)
{
Systems.Debugger.Write(ex);
}
return "none";
}