Mysql
#5

Quote:
Originally Posted by Anthonyx3'
Посмотреть сообщение
edit:
pawn Код:
if (dialogid == 1)
    {
    new string[256], escpass[100];
    mysql_real_escape_string(inputtext, escpass);
    GetPlayerName(playerid, UserStats[playerid][Name], MAX_PLAYER_NAME);
    format(string,sizeof(string),"INSERT INTO `Users` (`Name`, `Password`) VALUES ('%s', '%s')",UserStats[playerid][Name], escpass);
    mysql_query(string);
    }
Would work right? and anti injectable?
If that's the correct order for function parameters in the MySQL plugin you use, yes.
Reply


Messages In This Thread
Mysql - by Anthonyx3' - 07.01.2011, 02:33
Re: Mysql - by Calgon - 07.01.2011, 02:36
Re: Mysql - by Anthonyx3' - 07.01.2011, 02:39
Re: Mysql - by Anthonyx3' - 07.01.2011, 02:43
Re: Mysql - by Calgon - 07.01.2011, 02:45
Re: Mysql - by Anthonyx3' - 07.01.2011, 02:46
Re: Mysql - by Anthonyx3' - 07.01.2011, 02:51
Re: Mysql - by Calgon - 07.01.2011, 03:10
Re: Mysql - by Anthonyx3' - 07.01.2011, 03:14
Re: Mysql - by Scenario - 07.01.2011, 03:16

Forum Jump:


Users browsing this thread: 1 Guest(s)