How to escape string
#1

How to escape a string corectly?


HTML Code:
mysql_real_escape_string(aString, aString);
	format(szMessage, sizeof(szMessage), "INSERT INTO punsishes (text, playerID) VALUES ('%s', '%d')", aString,PlayerVar[playerid][pInternalID]);
	mysql_tquery(handle,szMessage);
or
HTML Code:
	format(szMessage, sizeof(szMessage), "INSERT INTO punsishes (text, playerID) VALUES ('%s', '%d')", aString,PlayerVar[playerid][pInternalID]);
mysql_real_escape_string(szMessage, szMessage);
	mysql_tquery(handle,szMessage);
Reply


Messages In This Thread
How to escape string - by Nin9r - 16.06.2016, 09:49
Re: How to escape string - by Sime30 - 16.06.2016, 09:56
Re: How to escape string - by Sjn - 16.06.2016, 09:57
Re: How to escape string - by Nin9r - 16.06.2016, 10:00
Re: How to escape string - by Sjn - 16.06.2016, 10:02
Re: How to escape string - by Nin9r - 16.06.2016, 10:05
Re: How to escape string - by Sjn - 16.06.2016, 10:10
Re: How to escape string - by Nin9r - 16.06.2016, 10:12
Re: How to escape string - by Sjn - 16.06.2016, 10:19
Re: How to escape string - by Nin9r - 16.06.2016, 10:24
Re: How to escape string - by Stinged - 16.06.2016, 10:46
Re: How to escape string - by Nin9r - 16.06.2016, 11:16
Re: How to escape string - by Stinged - 16.06.2016, 11:32

Forum Jump:


Users browsing this thread: 1 Guest(s)