note 35396 added to function.mssql-query
| From: | Me at rack1 dot php dot net | Date: | Fri, 29 Aug 2003 17:53:16 +0000 |
| Subject: | note 35396 added to function.mssql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-55316@lists.php.net to get a copy of this message | ||
Kelsey made a note that the only character that MSSQL needs "escaping" is the single quote
', and it done by using two single quotes ''. You will want to make sure that, when
using strings, you contain the strings in single quotes, since you can't escape double quotes.
In addition, you won't find a mssql_escape_string() function (though there are for other
DB's, i.e. mysql_escape_string()), but using:
$escapedString = str_replace("'","''",$stringToEscape);
Will accomplish the same thing.
----
Manual Page -- http://www.php.net/manual/en/function.mssql-query.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35396
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35396&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35396&report=yes