Re: image display

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 13 April 2005 09:11, Cima wrote:
> hi,
>
> what is the best way to display an image, that is stored in a database in
> postgres, in a table form along with other fields that are in the same
> table?
>
> postgresql 8.0
> e.g my_table(name varchar(15),sex character (1), picture_id oid)
>
> in a table in php, i'd like to show all the rows in my_table with all the
> fields including the picture.

You'll have to write a separate php script that sends an image MIME type, 
reads the image from the pgsql database and sends it to the client. 

You can't use a single script since the images in a browser are loaded by 
separate http requests and the MIME type of the web page (text/html) is 
different from the MIME type of the image (image/jpeg, image/gif, image/png 
etc.).

>
> thanx.

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436

Attachment: pgpQQYsFAAwdH.pgp
Description: PGP signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux