MySQL problem [EASY, ++REP]
#1

well, here it gets me arguement type mismatch

PHP код:
    if(dialogid == DIALOG_REGISTER)
    {
        if(
response)
        {
            if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD"Register""You should enter a password in order to continue""Register""Quit");
            new 
query[200], pName[MAX_PLAYER_NAME], tmp;
            
format(querysizeof(query), "SELECT id FROM accounts ORDER BY id DESC LIMIT 1");
            
mysql_query(query);
            
mysql_store_result();
            while(
mysql_fetch_row_format(query"|"))
            {
                
mysql_get_field("id"tmp);
                
strval(tmp);
                
tmp tmp 1;
            }
            
mysql_free_result();
            
GetPlayerName(playeridpNamesizeof(pName));
            
format(querysizeof(query), "INSERT INTO accounts(id, name, password) VALUES ('%i', '%s','%s')"tmppNameinputtext);
            
mysql_query(query);
            
SendClientMessage(playerid, -1"You have been registered");
        } 
Reply


Messages In This Thread
MySQL problem [EASY, ++REP] - by MarcGonzales - 15.06.2015, 09:16
Re: MySQL problem [EASY, ++REP] - by MarcGonzales - 15.06.2015, 09:18
Re: MySQL problem [EASY, ++REP] - by Vince - 15.06.2015, 09:37
Re: MySQL problem [EASY, ++REP] - by mamorunl - 15.06.2015, 10:00
Re: MySQL problem [EASY, ++REP] - by MarcGonzales - 15.06.2015, 19:21
Re: MySQL problem [EASY, ++REP] - by Konstantinos - 15.06.2015, 19:26

Forum Jump:


Users browsing this thread: 1 Guest(s)