The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#61
|
|||
|
|||
3.2.0?
|
#62
|
||||
|
||||
Quote:
Anyone ? |
#63
|
||||
|
||||
Really you should use mysql_escape_string when cleansing input for the database That's PHPs native function. I can't understand why everyone is using addslashes still (myself included )
|
#64
|
||||
|
||||
What about mysql_real_escape_string()?
|
#65
|
||||
|
||||
So basically as long as you are using something as input into an SQL query, it would be good to use mysql_real_escape_string() first, regardless of whether it is a Insert, Select or whatever kind of query ?
|
#66
|
||||
|
||||
This is what PHP Devs have to say:
Quote:
|
#67
|
|||
|
|||
Quote:
AFAIK they are both native and almost identical (not mysql_real.. because that one also uses the database connection to take the character set used in account). mysql_(real_)escape_string can be used since PHP 4.0.3, where addslashes was already available since PHP 3. |
#68
|
||||
|
||||
I want to know whether I should use mysql_real or keep using addslashes. Someone give me a definite "this or that" answer, or else someone will be in much pain
|
#69
|
||||
|
||||
Sorry I was tired last night when I made that post. I meant mysql_real_escape_string, and that addslashes won't properly escape everything pasted to an SQL query like mysql_real_escape_string will
|
#70
|
||||
|
||||
Could someone write a tutorial on how to avoid such problems, maybe all the developers will follow it, I could sure use one.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|