SA-MP Forums Archive
protect SQL - 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: protect SQL (/showthread.php?tid=377315)



protect SQL - toi - 13.09.2012

In my GM use a SQLite database, how can I protect it from sql injection?


Re: protect SQL - mamorunl - 13.09.2012

mysql_real_escape_string and keeping your variable sizes as short as they need to be. Also adding slashes and dont use varchar for an int and that kind of stuff.


Re: protect SQL - toi - 13.09.2012

Quote:

mysql_real_escape_string

under which callback I put it?


Re: protect SQL - mamorunl - 13.09.2012

Where you get your input. It is being used on the string that you send to the database.