Re: Re[3]: [PHP] HTML in database
| From: | Bruce Cowin | Date: | Thu, 05 Jul 2007 01:14:12 +0000 |
| Subject: | Re: Re[3]: [PHP] HTML in database | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-258293@lists.php.net to get a copy of this message | ||
Oh, thanks very much. I didn't know about PDO before. I wish I had before I had written my
own db class! :-) Thanks again and I'll try it out.
Regards,
Bruce
>>> Richard Davey <rich@corephp.co.uk> 5/07/2007 12:38:02 p.m. >>>
>> Thanks. Sorry, I should have mentioned I'm using MS Sql Server and
>> I don't see a mssql equivalent to that function.
> MSSQL treats '' as an escaped ', not \' like MySQL does.
> So you can't addslashes it. Perform your own ' to '' conversion.
And to reply to my own reply :) ...
If you can, use PDO with the PDO MSSQL driver instead.
Then let PDO worry about escaping for you!
Cheers,
Rich
--
Zend Certified Engineer
http://www.corephp.co.uk
"Never trust a computer you can't throw out of a window"
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php