note 89571 deleted from function.mysql-real-escape-string by danbrown
| From: | danbrown@php.net | Date: | Sat, 14 Mar 2009 14:59:41 +0000 |
| Subject: | note 89571 deleted from function.mysql-real-escape-string by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151908@lists.php.net to get a copy of this message | ||
Note Submitter: panzererik at gmx dot net
----
@LPChip:
I think you are wrong. A string enclosed in backticks defines an identifier, not a string literal.
Thus the condition
password=foobar checks whether the values of the
columns password and foobar match. In general this would cause an error as a column foobar in
general will not exist and for sure this is not the behaviour you intended.
You would use password='foobar'. This works fine, an unescaped backtick in a
string literal is no problem, '`' is the string containing one backtick. So there is no
need for mysql_real_escape_string to escape a backtick.