note 16649 deleted from function.addslashes by jimw
| From: | jimw@php.net | Date: | Thu, 08 Nov 2001 00:08:17 +0000 |
| Subject: | note 16649 deleted from function.addslashes by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20584@lists.php.net to get a copy of this message | ||
Quite often, addslashes() doesn' work for MS Access "databases". Thus, below is a
quick and dirty function for escaping strings for insertion into an MS Access db.
function odbcAddSlashes($foo)
{
$foo = str_replace("'", "''", $foo);
$foo = str_replace('"', '""', $foo);
// return the modified value
return $foo;
}