pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Cornelia Boenigk <poppcorn@cornelia-boenigk.de>
To: PGSQL+PHP <pgsql-php@postgresql.org>
To: Patrick Hatcher <PHatcher@macys.com>
Subject: Re: How do I display an image?
Date: Thu, 24 Oct 2002 02:36:35 +0200
Message-ID: <E184Vz5-00067Q-00@mrelayng3.kundenserver.de> (raw)

Hi Patrick

Before storing the binary data in the BYTEA-Field use

pg_escape_bytea($imagedata)

After retrieving the imagedata from the table you must remove the slashes
the above function added. Use stripCslashes().

$image = stripcslashes($imagedata);

This works for me;-)
pg_escape_bytea() is available since php 4.2.0.

regards
Conni





view thread (4+ messages)  latest in thread

Message-ID: <E184Vz5-00067Q-00@mrelayng3.kundenserver.de>
Permalink:  ../E184Vz5-00067Q-00@mrelayng3.kundenserver.de/
Also on:    postgresql.org/message-id/E184Vz5-00067Q-00@mrelayng3.kundenserver.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: poppcorn@cornelia-boenigk.de, PHatcher@macys.com
  Subject: Re: How do I display an image?
  In-Reply-To: <E184Vz5-00067Q-00@mrelayng3.kundenserver.de>
  References: <E184Vz5-00067Q-00@mrelayng3.kundenserver.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox