> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 21 January 2003 15:05
> 
> Thanks Rick & Henry, but I am still unable to add single 
> quotation marks '.
> When I added the \' to the variable as given below (thanks 
> again Rick) I get
> the following error when trying to add anything, regardless of ':

Oracle does its quote-escaping different!  To insert a single-quote within a
single-quoted value, you have to double it, so:

   $query = "UPDATE ACTIVITY SET COMMENTS = 'That''s right' WHERE ...";

So, you either have to run a str_replace("'", "''", $updatecomments) before
constructing the query, or you can use addslashes() and turn on the
magic_quotes_sybase option -- if you do the latter, and also have
magic_quotes_gpc and/or magic_quotes_runtime turned on, "magic" quoting will
also escape with a second quote rather than a backslash.

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: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 


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

Reply via email to