Thread: postgresql in PHP

postgresql in PHP

From
davidrboyer@gmail.com
Date:
When I try to add or update a postgresql field from php, even though I
escape it, when I
try to include a single quote in a varchar field, the result is the
quote and everything following
is missing after being INSERTed or UPDATEd.  Anybody have any ideas
what is going on?
Thanks in advance!

Dave


Re: postgresql in PHP

From
brian
Date:
davidrboyer@gmail.com wrote:
> When I try to add or update a postgresql field from php, even though I
> escape it, when I
> try to include a single quote in a varchar field, the result is the
> quote and everything following
> is missing after being INSERTed or UPDATEd.  Anybody have any ideas
> what is going on?
> Thanks in advance!

What is the setting for magic_quotes_gpc in your php.ini?

hint: get_magic_quotes_gpc() will return TRUE if this is enabled, so you
can use stripslashes() where necessary.

Are you using a database wrapper (eg. PEAR MDB2) or the pg_whatever()
functions?

If the former, are you using a prepared statement?

brian