Re: graphics display

From: "Patrick Hatcher" <PHatcher(at)macys(dot)com>
To: nogueira(at)hc(dot)unicamp(dot)br
Cc: novice-postgres <pgsql-novice(at)postgresql(dot)org>, pgsql-novice-owner(at)postgresql(dot)org
Subject: Re: graphics display
Date: 2002-11-25 16:29:33
Message-ID: OFACA60F5E.F7833F08-ON88256C7C.005A686B-88256C7C.005A8DDE@fds.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


You didn't say, but I'll assume you are using PHP. This was given to me by
someone on the forum:

<?php
include('common_db.inc');

// getimagedata.php3 - by Florian Dittmer <dittmer(at)gmx(dot)net>
// Example php script to demonstrate the direct passing of binary data
// to the user. More infos at http://www.phpbuilder.com
// Syntax: getdata.php3?id=<id>
$id = $_GET["id"];
if($id) {
$db = db_connect();
$results = pg_query($db,"Select someimage from tblimage7");
$row = pg_fetch_array($results);

echo stripcslashes($row[0]);

}
?>

Patrick Hatcher
Macys.Com
Legacy Integration Developer


Eduardo Nogueira
<nogueira(at)hc(dot)unicamp(dot)br To: novice-postgres <pgsql-novice(at)postgresql(dot)org>
> cc:
Sent by: Subject: [NOVICE] graphics display
pgsql-novice-owner(at)post
gresql.org


11/24/2002 06:56 PM
Please respond to
nogueira

Hi

I want to make a table with one field containing graphics. How can I
display
them? I have followed 2 directions, either with some problems:

(1) in one table I used blobs, with success but how to display the figures
?

(2) in another I used a field to link to existing figures and outputting
the
query as a html file. I type something like <img
src="/home/nogueira/fig1.gif" >. But, the html file comes out without the
html tags (" <>" ) and then I have to edit the file and type the tags to
see
the figures.

Thank for your attention and any help

Eduardo
-------------------------------------------------

Eduardo A. Nogueira, MD, PhD
Cardiac Catheterization Laboratory
University of Campinas School of Medicine
Campinas, Sao Paulo
Brazil

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

Browse pgsql-novice by date

  From Date Subject
Next Message Mark Nelson 2002-11-25 16:50:24 arrays vs. columns
Previous Message Bruno Wolff III 2002-11-25 13:58:41 Re: Few questions