note 89571 added to function.mysql-real-escape-string
| From: | panzererik at gmx dot net | Date: | Sat, 14 Mar 2009 10:04:55 +0000 |
| Subject: | note 89571 added to function.mysql-real-escape-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-151861@lists.php.net to get a copy of this message | ||
@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.
----
Server IP: 69.147.83.197
Probable Submitter: 84.186.84.36
----
Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php
Edit -- https://master.php.net/note/edit/89571
Del: integrated -- https://master.php.net/note/delete/89571/integrated
Del: useless -- https://master.php.net/note/delete/89571/useless
Del: bad code -- https://master.php.net/note/delete/89571/bad+code
Del: spam -- https://master.php.net/note/delete/89571/spam
Del: non-english -- https://master.php.net/note/delete/89571/non-english
Del: in docs -- https://master.php.net/note/delete/89571/in+docs
Del: other reasons-- https://master.php.net/note/delete/89571
Reject -- https://master.php.net/note/reject/89571
Search -- https://master.php.net/manage/user-notes.php