note 28429 modified in function.addslashes by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Mon, 13 Jan 2003 08:11:09 +0000 |
| Subject: | note 28429 modified in function.addslashes by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-42046@lists.php.net to get a copy of this message | ||
[Editor's note: See also the php.ini configuration magic_quotes_sybase at the URL http://www.php.net/manual/en/ref.sybase.php]
please note that addslashes will NOT work with mssql, since mssql does not use the backslash
character as an escape mechanism. just double your quotes instead. or use this:
function mssql_addslashes($data) {
$data = str_replace("'", "''", $data);
return $data;
}
--was--
please note that addslashes will NOT work with mssql, since mssql does not use the backslash
character as an escape mechanism. just double your quotes instead. or use this:
function mssql_addslashes($data) {
$data = str_replace("'", "''", $data);
return $data;
}
http://www.php.net/manual/en/function.addslashes.php