mysql escape - 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: mysql escape (
/showthread.php?tid=566604)
mysql escape -
Banditukas - 07.03.2015
Hi,
Can i escape string like this:
Код:
new GlbStr[ 128 ];
mysql_real_escape_string(GlbStr,GlbStr);
Re: mysql escape -
Banditukas - 07.03.2015
And too i notice when i'am use %e in query it means escaping but not need use mysql_real_escape_string escape better than this function, because when i use %s, i get syntax errors, when i change to %e then no syntax error never been. Maybe there is update for mysql_real_escape_string ? because using %e in large queries it'is not working.
Re: mysql escape -
arad55 - 07.03.2015
You're not supposed to escape the whole query string if you're doing so. You're supposed to escape user input strings only to prevent injections. Then, format a string with your query and escaped user input string to your liking.