mysql problem
#5

case DIALOG_CLANNAME:
{
new string2[128];
mysql_format(mysql, szQuery, 256, "INSERT INTO `clans` (`ClanName`) VALUES ('%e')", inputtext);
new Cache: result = mysql_query(mysql, szQuery);
new i = cache_insert_id();
cache_delete(result);
PlayerInfo[playerid][pClanid] = i;
UpdateVariable(playerid, pClanidx);
format(string2, sizeof(string2), "Ai setat numele clanului la {ff0000}%s", inputtext);
SendClientMessage(playerid, -1,string2);
ShowPlayerDialog(playerid, DIALOG_CLANTAG, DIALOG_STYLE_INPUT, "Clan tag:", "Choose you clan tag:", "Choose" , "Cancel");

}
case DIALOG_CLANTAG:
{
if(!response) return SendClientMessage(playerid, COLOR_GREY, "Ai renuntat la crearea clanului");
new string[128];
PlayerInfo[playerid][pClanRank] = 7;
PlayerInfo[playerid][pClanMember] = 1;
PlayerInfo[playerid][pPremiumPoints] -= 500;
UpdateVariable(playerid, pClanRankx);
UpdateVariable(playerid, pClanMemberx);
UpdateVariable(playerid, pPremiumPointsx);
mysql_format(mysql, szQuery, 256, "UPDATE `clans` SET `ClanTag` = '%e' WHERE ClanID = '%d'", inputtext, PlayerInfo[playerid][pClanid]);
new Cache: result = mysql_query(mysql, szQuery);
cache_delete(result);
format(string, sizeof(string), "Ai setat tag-ul clanului la {0000ff}%s",inputtext);
SendClientMessage(playerid, -1, string);
}

My clan tag still wont show in the database but the name will
Reply


Messages In This Thread
mysql problem - by bosmania - 27.02.2019, 18:25
Re: mysql problem - by SymonClash - 27.02.2019, 18:58
Re: mysql problem - by bosmania - 28.02.2019, 10:37
Re: mysql problem - by bosmania - 28.02.2019, 12:22
Re: mysql problem - by bosmania - 28.02.2019, 12:29

Forum Jump:


Users browsing this thread: 1 Guest(s)