Re: [PHP] Re: MySQL Problem with PHP

2002-06-26 Thread Erik Price
On Wednesday, June 26, 2002, at 08:58 AM, John Holmes wrote: >> I just preg_replace("/\'/","\'",$text) and all was good :o) > > That's what addslashes() is for. It handles single and double quotes, > backslashes, and nulls, so you won't have any problems... Plus IIRC it's a C extension so it'l

RE: [PHP] Re: MySQL Problem with PHP

2002-06-26 Thread John Holmes
> I just preg_replace("/\'/","\'",$text) and all was good :o) That's what addslashes() is for. It handles single and double quotes, backslashes, and nulls, so you won't have any problems... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

[PHP] Re: MySQL Problem with PHP

2002-06-26 Thread BB
I just preg_replace("/\'/","\'",$text) and all was good :o) "David Robley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] says... > > I am using PHP and MySQL on a 2k dev box to be uploaded to a linux box > >

[PHP] Re: MySQL Problem with PHP

2002-06-26 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I am using PHP and MySQL on a 2k dev box to be uploaded to a linux box > > I have a piece of SQL > > INSERT INTO `contracts` (`key`, `content`) VALUES (1,'blah blah blah > character 39 is a single speach mark '+CHAR(39)+' blah blah bla