SQLite not creating sql_sequence properly
#6

I noticed that Query is being executed correctly but it does not create a new row each time I complete a register.

I have been brainstorming looking at topics till now but couldn't find a solution.

Here is my code
pawn Код:
if(dialogid == Register)
    {
        if(response)
        {
            if(!IsValidPassword(inputtext))
            {
                SendClientMessage(playerid, -1, "[ERROR]Invalid password, valid characters are A-Z, a-z, 0-9.");
                ShowPlayerDialog(playerid, Register, DIALOG_STYLE_PASSWORD, "Register", "Welcome new comer! Please choose a password and type it in to register.", "Register", "Quit");
                return 1;
            }
            if(strlen(inputtext) < 3 || strlen(inputtext) > 24)
            {
                SendClientMessage(playerid, -1, "[ERROR]You can only write a password that contains 3 to 24 characters.");
                ShowPlayerDialog(playerid, Register, DIALOG_STYLE_PASSWORD, "Register", "Welcome new comer! Please choose a password and type it in to register.", "Register", "Quit");
                return 1;
            }
            new Query[800];
            WP_Hash(dAdmin[playerid][USER_PASSWORD], 129, inputtext);
            format(Query, sizeof(Query), "INSERT INTO users (username, password) VALUES ('%s', '%s')", DB_Escape(dAdmin[playerid][USER_NAME]), DB_Escape(dAdmin[playerid][USER_PASSWORD]));
            db_query(Database, Query);
            ShowPlayerDialog(playerid, Login, DIALOG_STYLE_PASSWORD, "Login", "Congratulations! You have successfully registered to the server to complete the proccess re enter your password.", "Login", "Quit");
        }
        else Kick(playerid);
    }
print
Код:
[23:56:22] [join] DarkLored has joined the server (0:127.0.0.1)
[23:56:24] INSERT INTO users (username, password) VALUES ('DarkLored', '947BDCAF9B8FAC501D1C9DAA37DC57714F85AA0D781B18914B29BCF379DFBA665BBEDC15817873B1D92ADE4ABFE8ECDC8EBFC07F463D268ED4C595B4E383A8DB')
[23:56:35] [part] DarkLored has left the server (0:1)
Reply


Messages In This Thread
SQLite not creating sql_sequence properly - by DarkLored - 25.08.2015, 17:22
Re: SQLite not creating sql_sequence properly - by LetsOWN[PL] - 25.08.2015, 17:40
Re: SQLite not creating sql_sequence properly - by DarkLored - 25.08.2015, 17:44
Re: SQLite not creating sql_sequence properly - by LetsOWN[PL] - 25.08.2015, 18:03
Re: SQLite not creating sql_sequence properly - by DarkLored - 25.08.2015, 23:29
Re: SQLite not creating sql_sequence properly - by DarkLored - 26.08.2015, 04:21
Re: SQLite not creating sql_sequence properly - by LetsOWN[PL] - 26.08.2015, 08:52
Re: SQLite not creating sql_sequence properly - by DarkLored - 26.08.2015, 16:28

Forum Jump:


Users browsing this thread: 1 Guest(s)