note 16649 added to function.addslashes

From: Date: Wed, 07 Nov 2001 21:29:51 +0000
Subject: note 16649 added to function.addslashes
Groups: php.notes 
Request: Send a blank email to php-notes+get-20564@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; } -- http://www.php.net/manual/en/function.addslashes.php http://master.php.net/manage/user-notes.php?action=edit+16649 http://master.php.net/manage/user-notes.php?action=delete+16649 http://master.php.net/manage/user-notes.php?action=reject+16649

« previous php.notes (#20564) next »