Subject Re: [firebird-php] Escaping strings
Author Lester Caine
Alan McDonald wrote:

> maybe I have it round the wrong way - the magic quotes inserts the extra
> quote and that converts the SQL statement into the double, FB then strips
> out the extra one before storage. Is that correct?

Yes - otherwise the quotes would be lost altogether - So ...

> I have
> magic_quotes_sybase = on
> in my ini file and I get single quotes doubled as expected...
> Does FB automatically unescape two single quotes when you retrieve the
> string value? (or rather should it?) I can;t seem to do it automatically
> and
> I'd rather not have to manually unescape every string I retrieve.

... there should not be an extra quote when you read the
data back.

This really is a most annoying area - single quotes, double
quotes, reverse quotes - and all can be mixed up. Wouldn't
it be nice if a few of the higher characters that are not
being used were reallocated for this purpose?

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services