note 61943 added to function.mysql-real-escape-string
| From: | datacruser88atyahoodotcom at osu1 dot php dot net | Date: | Wed, 15 Feb 2006 18:12:27 +0000 |
| Subject: | note 61943 added to function.mysql-real-escape-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-103785@lists.php.net to get a copy of this message | ||
it's a shame that it doesn't escape all strings that can affect a search like
'_' if you do a search say
select * from userdb where email like 'david_%';
it will select all strings with 'david' at the beginning and ignore the underscore, but if
you do
select * from userdb where email like 'david\\_%' it's closer to what you are looking
for and will find all email address that begin 'david_'
I know this is true with mysql 4.0.1, not sure about other versions.
There must be other characters like that. No?
----
Server IP: 216.194.113.175
Probable Submitter: 24.193.92.118
----
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+61943
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61943&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61943&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61943&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61943&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61943&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61943&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61943&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61943&report=yes
Search -- http://master.php.net/manage/user-notes.php