mysql_real_escape_string - 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_real_escape_string (
/showthread.php?tid=492103)
mysql_real_escape_string -
audriuxxx - 02.02.2014
Hi,
Can i use mysql_real_escape_string, and is it will escape string, when i use it in Mysql BlueG R35 threaded plugin?
Re: mysql_real_escape_string -
Konstantinos - 02.02.2014
You should only escape strings when you input/pass as an argument a string to a query to avoid from being victim of SQL Injection. However, I recommend you to use
mysql_format instead which does pretty much the same but it's more convinient than using
mysql_real_escape_string all the time.
Re: mysql_real_escape_string -
audriuxxx - 02.02.2014
Thanks so much. And i want to ask what is difference between threaded and non-threaded queries?
Re: mysql_real_escape_string -
Konstantinos - 02.02.2014
The difference it said to this post:
http://forum.sa-mp.com/showpost.php?...04&postcount=3
And yes, it's recommended NOT to use non-threaded queries. Use threaded queries or ORM which are both faster.