SA-MP Forums Archive
MySQL problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: MySQL problem (/showthread.php?tid=457851)



MySQL problem - Lyksus - 13.08.2013

Hi there community of SA-MP,

I am having an issue with my script.
I've made a login/register script.
When I register, it's not saving it in the mysql.

Here is the code I used.

pawn Код:
stock registerScriptLoad(playerid, passwordtext[])
    {  
        new query[258], data[50];
        format(query, sizeof(query), "INSERT INTO accounts (PlayerName, Password, IP) VALUES('%s', sha1('%s'), '%s')", pName(playerid), passwordtext, GetIP(playerid));
        mysql_query(query);
       
        mysql_fetch_field_row(data, "id"); Player[playerid][accountID] = strval(data);
    }



Re: MySQL problem - Lyksus - 13.08.2013

Nevermind! I fixed the problem!