Re: Bug #3088: addslashes doesn't work properly
| From: | Phil Driscoll | Date: | Mon, 03 Jan 2000 16:44:25 +0000 |
| Subject: | Re: Bug #3088: addslashes doesn't work properly | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-14224@lists.php.net to get a copy of this message | ||
I haven't used M$SQL, but I unavoidably have to use M$ Access, which does
not seem to use slashes to escape special chars in SQL queries. Instead it
uses two of the special char together (eg '' when you want a '). I haven't
found any documentation on this, but my fix certainly works. Perhaps M$SQL
uses the same scheme.
For info, the way I process my query strings is to use addslashes, and then
use str_replace to replace \' with '' and \" with "".
Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org