SA-MP Forums Archive
Escaping - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Escaping (/showthread.php?tid=607369)



Escaping - ScIrUsna - 18.05.2016

Hi,

I'am escaping with

mysql_real_escape_string

and then use mysql_tquery with parameters and sending string escaped string, and in public i use that string update name or text, i want to ask is escaping string is still escaping or i need again escape in public?


Re: Escaping - Vince - 18.05.2016

You should use mysql_format with the %e specifier. That way you don't have to escape each individual item separately. Escaping is only necessary to tell the parser that the character that follows is part of the input value rather than a delimiter.