Escaping Strings SQLite Question
#1

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
Reply
#2

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
Reply
#3

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
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)