note 28429 modified in function.addslashes by vrana

From: Date: Tue, 17 Aug 2004 13:56:37 +0000
Subject: note 28429 modified in function.addslashes by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79812@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: <?php function mssql_addslashes($data) { $data = str_replace("'", "''", $data); return $data; } ?> --was-- [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; } http://php.net/manual/en/function.addslashes.php

« previous php.notes (#79812) next »