Posts: 100
Threads: 2
Joined: May 2016
Posts: 100
Threads: 2
Joined: May 2016
You should basically only escape inputs.
You're better off leaving that function aside. And when you are going to execute a query that has custom inputs in it, use the %q specifier (escapes the string placed in the parameter), instead of the %s specifier.
The %q specifier is built into the native format.
Posts: 285
Threads: 154
Joined: Mar 2016
Reputation:
0
But i heard i have to escape everything i write into database update,select,delect queries any collum is text and player can write
Posts: 519
Threads: 21
Joined: Nov 2012
Reputation:
0
use mysql_format and use %e to escape.
Posts: 100
Threads: 2
Joined: May 2016
Quote:
Originally Posted by ScIrUsna
But i heard i have to escape everything i write into database update,select,delect queries any collum is text and player can write
|
You only have to escape strings that players have inputted/specified.
Posts: 285
Threads: 154
Joined: Mar 2016
Reputation:
0
Yes, but i don't understand with first question, when i write escaped text in other variable i need reescape again?