note 53739 added to function.mysql-real-escape-string
| From: | ivanhoe011 at gmail dot com | Date: | Sat, 11 Jun 2005 07:54:04 +0000 |
| Subject: | note 53739 added to function.mysql-real-escape-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90252@lists.php.net to get a copy of this message | ||
MySQL manual says for mysql_real_escape_string() function:
"Strictly speaking, MySQL requires only that backslash and the quote character used to quote
the string in the query be escaped. This function quotes the other characters to make them easier to
read in log files."
Based on this I'm a bit susspicious if "best practice" approach is really needed
when working with plain strings...using magic quotes, then doing stripslashes, and then again
mysql_real_escape_string() seems pretty much like doing the same thing twice, and only benefit seems
to be having (mysql) log files more readable?
----
Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53739
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53739&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53739&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53739&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53739&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53739&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53739&report=yes
Search -- http://master.php.net/manage/user-notes.php