mysql saving
#1

Код:
case DIALOG_FORUMNAME:
  		{
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_FORUMNAME , DIALOG_STYLE_INPUT, "Forumname", "Te rugam introdu-ti numele de pe forum mai jos.", "Enter", "Cancel");
                new string[64];
                
                GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
				mysql_real_escape_string(szPlayerName, szPlayerName);

				format(szLargeString, sizeof(szLargeString), "INSERT INTO playeraccounts (forumname) VALUES('%s')", inputtext);
				mysql_tquery(handle, szLargeString);
				SCM(playerid, COLOR_GREEN, "Ti-ai setat forumname-ul.");
            }
		}
This is the dialog for /forumname but if he use it again it will add another row?
How to make to update the actual row if he already set his username?
Reply


Messages In This Thread
mysql saving - by AndreiWow - 27.12.2015, 13:49
Re: mysql saving - by Boar - 27.12.2015, 14:12
Re: mysql saving - by zPain - 27.12.2015, 14:16
Re: mysql saving - by ikey07 - 27.12.2015, 14:17

Forum Jump:


Users browsing this thread: 1 Guest(s)