Where to use mysql_real_escape_string
#3

mysql_real_escape_string is a function for avoid SQL injection http://it.wikipedia.org/wiki/SQL_injection

You have to use it when a player input a text directly to a query

EXAMPLE:

pawn Code:
new escapedtext[128];
mysql_real_escape_string(inputfromplayer, escapedtext);
myquerywithformat("INSERT INTO something (yea) VALUES('%s')",escapedtext);
Reply


Messages In This Thread
Where to use mysql_real_escape_string - by amit133 - 24.06.2013, 08:59
Re: Where to use mysql_real_escape_string - by rappy93 - 24.06.2013, 09:37
Re: Where to use mysql_real_escape_string - by iJumbo - 24.06.2013, 09:37
Re: Where to use mysql_real_escape_string - by PaulDinam - 24.06.2013, 09:42
Re: Where to use mysql_real_escape_string - by Vince - 24.06.2013, 10:31
Re: Where to use mysql_real_escape_string - by iJumbo - 24.06.2013, 10:35
Re: Where to use mysql_real_escape_string - by amit133 - 24.06.2013, 15:25
Re: Where to use mysql_real_escape_string - by iJumbo - 24.06.2013, 18:40

Forum Jump:


Users browsing this thread: 3 Guest(s)