Actually, that eliminated the error messages but it still hasn't fix the

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
> 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 (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to