RE: Oracle problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----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 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux