Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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:


// 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
// 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
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                                                         
                    11/24/2002 06:56 PM                                                                                                          
                    Please respond to                                                                                                            


I want to make a table with one field containing graphics. How can I
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
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
the figures.

Thank for your attention and any help


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

---------------------------(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)

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group