Re: Problems inserting single quote into Oracle database
| From: | Thies C. Arntzen | Date: | Wed, 31 Oct 2001 07:13:37 +0000 |
| Subject: | Re: Problems inserting single quote into Oracle database | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-72987@lists.php.net to get a copy of this message | ||
On Tue, Oct 30, 2001 at 09:54:19PM -0800, Hugh Danaher wrote:
> I don't know if this will work for Oracle but try putting a backslash before
> the single quote mark (e.g. it\'s) the ' should then taken as another
> character by php.
> Hope this works for you.
single quotes are escaped using another single quote in
oracle:
$var = "it''s";
will do the job.
tc
> Hugh
> ----- Original Message -----
> From: Kevin Dewsnup <kdewsnu@yahoo.com>
> To: <php-general@lists.php.net>
> Sent: Tuesday, October 30, 2001 4:31 PM
> Subject: [PHP] Problems inserting single quote into Oracle database
>
>
> > I am having problems with inserting single quote's
> > into an oracle 8.1.7 database through a form.
> >
> > When inserting 'its' it works fine.
> >
> > When inserting 'it's' I get this error:
> > "OCIParse: ORA-01756: quoted string not properly
> > terminated in blah..."
> >
> > So then I try 'it''s' (which works in SQL*Plus) I get
> > this error:
> > "OCIStmtExecute: ORA-00911: invalid character in
> > blah..."
> >
> > Thank's in advance!
> >
> > -Kevin
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Make a great connection at Yahoo! Personals.
> > http://personals.yahoo.com
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>