RE: [PHP-DB] Oracle problem
| From: | Ford, Mike [LSS] | Date: | Wed, 16 Oct 2002 11:14:58 +0000 |
| Subject: | RE: [PHP-DB] Oracle problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-22458@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: N.A.Morgan@bton.ac.uk [mailto:N.A.Morgan@bton.ac.uk]
> Sent: 16 October 2002 08:51
> To: php-db@lists.php.net
>
> Has anyone out there using PHP and Oracle come across this
> problem? I have
> a text area that allows free-form text that I store in a
> varchar2 column. I
> have problems with apostrophes in the free-form text.
Uh-oh! Standard can of worms no. 3!
> When
> users put in an
> apostrophe the SQL fails. If I force 3 apostrophes (the
Shouldn't that be *two* apostrophes? That's how it works here, anyway!
> usual Oracle method
> of embedding apostrophes) the SQL fails. The only way to get
> round the
> problem is to strip them out (which I consider a work-around
> not a fix).
You may also want to investigate the php.ini settings magic_quotes_gpc, magic_quotes_runtime and
magic_quotes_sybase -- although personally I prefer not to use these as I'm averse to magic
(well, other people's, anyway!).
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211