note 96984 added to function.mysql-real-escape-string
| From: | hikmet1023 at hotmail dot com | Date: | Thu, 25 Mar 2010 21:29:38 +0000 |
| Subject: | note 96984 added to function.mysql-real-escape-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-167422@lists.php.net to get a copy of this message | ||
about DATA LENGTH and mysql_real_escape_string
i have just experienced that this function does not harm the data length at all. It seems to use the
escaped string during insertion but still insert the UNESCAPED string:
I have tried INSERTing 50 char long string ( containing characters to be escaped) into 50 char long
datafield. I could SELECT the data without any loss and i didnt need to UNESCAPE it! So the data
comes ready cooked, just serve it to where you need to...
AND BEFORE GOING MAD typing, saving, changing for long hours:
as documented above, do not forget to stripslashes(yourstring) if you have to.
And as documented at mysql manuals: do not use SET NAMES, use mysql_set_charset
----
Server IP: 160.75.100.7
Probable Submitter: 88.237.23.44
----
Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php
Edit -- https://master.php.net/note/edit/96984
Del: integrated -- https://master.php.net/note/delete/96984/integrated
Del: useless -- https://master.php.net/note/delete/96984/useless
Del: bad code -- https://master.php.net/note/delete/96984/bad+code
Del: spam -- https://master.php.net/note/delete/96984/spam
Del: non-english -- https://master.php.net/note/delete/96984/non-english
Del: in docs -- https://master.php.net/note/delete/96984/in+docs
Del: other reasons-- https://master.php.net/note/delete/96984
Reject -- https://master.php.net/note/reject/96984
Search -- https://master.php.net/manage/user-notes.php