Re: How do I display an image?

From: "Cornelia Boenigk" <poppcorn(at)cornelia-boenigk(dot)de>
To: "PGSQL+PHP" <pgsql-php(at)postgresql(dot)org>, "Patrick Hatcher" <PHatcher(at)macys(dot)com>
Subject: Re: How do I display an image?
Date: 2002-10-24 00:36:35
Message-ID: E184Vz5-00067Q-00@mrelayng3.kundenserver.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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

Browse pgsql-php by date

  From Date Subject
Next Message Carlos Garcìa Gòmez 2002-10-24 06:33:23 Problems with OIDs
Previous Message Patrick Hatcher 2002-10-24 00:04:21 How do I display an image?