Umm, how about using str_replace to replace the quotes for there ASCII
equivalent's,
and when you print them out in HTML they will be interpreted properly,
or you
could str_replace them back.
On Thu, 2003-03-20 at 11:23, Poon, Kelvin (Infomart) wrote:
Actually, that eliminated the error messages but it still hasn't fix
the
problem
I did what you said....but now in my MSSQL table, the content column
has
somethign like thsi
"Step 1: blah blah balh
Step 2: blah balh balh \'Username\'"
so it included the slashes...I just learned that mSSQL doens;t
accept
slashes so is there any other way I can fix this problem?..I want
literally
step 1: balh bah balh
Step 2: balhb alhb alhb 'Username'
to be inserted to the table..please help
thanks a lot by the way
-----Original Message-----
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 11:06 AM
To: Poon, Kelvin (Infomart); [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Addslashes (MSSQL)
> where my $content value is osmethign like this.
>
> "Step 1: Access the homepage
> Step 2: type in your username under the field 'username' "
>
> and after the addslashes funciton there would be \ around the
'username'
> like this..
> \'username\'....and now after running this program I got an error
message:
>
> Warning: MS SQL message: Line 14: Incorrect syntax near
'username'.
> (severity 15) in
d:\apache_docroots\internal.infomart.ca\infodesk\kb_add.php
> on line 119
I think you need to replace ' with '' in MSSQL (one single quote
replaced
with two single quotes)
$text = str_replace("'","''",$old_text);
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc