note 49707 deleted from function.mysql-escape-string by danbrown
| From: | danbrown@php.net | Date: | Wed, 12 Aug 2009 21:49:11 +0000 |
| Subject: | note 49707 deleted from function.mysql-escape-string by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-159410@lists.php.net to get a copy of this message | ||
Note Submitter: codeslinger at compsalot dot com
----
er um... version_compare did not exist prior to 4.1.0
in any case, adding slashes and dealing with magic quotes etc. is a sure recipe for major
headaches.
You can avoid a whole slew of problems by converting your strings to hex (bin2hex) before passing
them to mySQL
mySQL will accept any value in the form of
0xFEAC1234...
It will then automagically convert it back to a string for storage and retrieval while avoiding all
of the zillions of problems with special characters.
I have done this with some very large records and never had a problem.