Re: MySQL Problem with PHP
| From: | BB | Date: | Wed, 26 Jun 2002 10:07:38 +0000 |
| Subject: | Re: MySQL Problem with PHP | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-103927@lists.php.net to get a copy of this message | ||
I just preg_replace("/\'/","\'",$text) and all was good :o)
"David Robley" <robleyd@paradise.net.nz> wrote in message
news:MPG.1784586929180e21989739@news.php.net...
> In article <20020626093515.12275.qmail@pb1.pair.com>,
> ben@themidwestgroup.com 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÷¯÷�7¯Ê‡
> > ÏAVj[Ê, content) VALUES (1,'blah blah blah
> > character 39 is a single speach mark '+CHAR(39)+' blah blah blah')
> >
> > Instead of inserting: 'blah blah blah character 39 is a single speach
mark '
> > blah blah blah
> > It inserts 0
> > All variations work fine when there is no single speachies
> >
> > help?
>
> Look into addslashes and the various magic_quotes settings in you r
> php.ini.
>
>
> --
> David Robley
> Temporary Kiwi!
>
> Quod subigo farinam