Re: graphics display - Mailing list pgsql-novice

From Patrick Hatcher
Subject Re: graphics display
Date
Msg-id OFACA60F5E.F7833F08-ON88256C7C.005A686B-88256C7C.005A8DDE@fds.com
Whole thread Raw
In response to graphics display  (Eduardo Nogueira <nogueira@hc.unicamp.br>)
List 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@gmx.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@hc.unicamp.br       To:     novice-postgres <pgsql-novice@postgresql.org>
                         
                    >                             cc:
                         
                    Sent by:                      Subject:     [NOVICE] graphics display
                         
                    pgsql-novice-owner@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@postgresql.org)




pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Few questions
Next
From: Mark Nelson
Date:
Subject: arrays vs. columns