inserting quotes into a database...
| From: | Kelvin Luck | Date: | Thu, 03 May 2001 15:26:33 +0000 |
| Subject: | inserting quotes into a database... | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-7260@lists.php.net to get a copy of this message | ||
Hi,
I am having trouble inserting single quotes into an mssql database... my
queries are taking the form:
mssql_query("update discussiontopics set comment = '$comment', title =
'$title', zoneid = $zoneID where topicid = $topicID");
If $comment or $title contain any single quote characters I get an sql
error. I thought that addSlashes() was meant to avoid these problems but it
hasn't helped me... Neither has quotemeta()... Are there any other hint's
for inserting single quotes into mssql databases?
tia,
Kelvin.