Escaping Strings SQLite Question - 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 Strings SQLite Question (
/showthread.php?tid=344004)
Escaping Strings SQLite Question -
Ballu Miaa - 19.05.2012
Hello everyone,
I was watching some tutorials over here for SQLite-Pawn usage. So i came to this part and even checked SAMP Wiki for it. ****** has created this Escaping Strings SQLite code. I want to know is:
1. What is it used for?
2. How do we use it?
3. What datatype it is used for?
4. What does it return
Etc.
If any one knows anything. Please let me know and help me learn. I will appreciate that a lot.
Thanks for reading.
Ballu Miaa
Re: Escaping Strings SQLite Question -
Calgon - 19.05.2012
1. It returns a string which for the most part prevents
this. You should always escape your strings before you allow them to be used in a query (INSERT, SELECT, UPDATE, DELETE, etc.)
2. Simply use the function to escape your string and use the returned string to prevent
SQL injection.
3. It supports any, as long as it's in a string form.
4. An
escaped string.
my bad for before, didn't read the post fully
Re: Escaping Strings SQLite Question -
Joe Staff - 19.05.2012
Escaping a string keeps the string from being damaging to the database. Anywhere a player's input reaches the database, you should escape it. Prevents corruption or modification
Re: Escaping Strings SQLite Question -
Ballu Miaa - 19.05.2012
Quote:
Originally Posted by Calgon
1. It returns a string which for the most part prevents this. You should always escape your strings before you allow them to be used in a query (INSERT, SELECT, UPDATE, DELETE, etc.)
2. Simply use the function to escape your string and use the returned string to prevent SQL injection.
3. It supports any, as long as it's in a string form.
4. An escaped string.
my bad for before, didn't read the post fully
|
Thanks for the great reply. Will use it then. Thanks a lot for the clarification
Quote:
Originally Posted by Joe Staff
Escaping a string keeps the string from being damaging to the database. Anywhere a player's input reaches the database, you should escape it. Prevents corruption or modification
|
Thanks for the reply Joe. I will use it for now. Repped+6 Both.