Re: Displaying image from php script displays string

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Alexander Reichstadt <lxr(at)me(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Displaying image from php script displays string
Date: 2012-09-11 16:06:36
Message-ID: 504F618C.8010709@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/09/2012 14:24, Alexander Reichstadt wrote:
>
>
> What am I doing wrong?
>

What version of PG are you using? The default output format of bytea
changed from "escape" to "hex" a version or two ago - try changing it to
"escape" and see if that makes a difference:

ALTER DATABASE xxxxx SET bytea_output='escape';

BTW, it's a REALLY bad idea to build literal SQL queries from input
values, as you're doing - you should use parameters and
pg_query_params() instead.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2012-09-11 16:09:22 AIX and ipv6
Previous Message John R Pierce 2012-09-11 15:29:07 Re: Displaying image from php script displays string