Re: how to display images stored in DB

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

 



At 7:17 PM +0100 2/25/07, Alain Roger wrote:
Hi,

i stored all my pictures in my PostgreSQL DB as bytea type.
Now i would like to know how can i display them in my PHP pages ?

where can i find some example ?

thanks a lot,

--
Alain


Alain:

I don't know how to extract images from PostgreSQL, but to display image files extracted from MySQL, I use:

$fileType = @mysql_result($result, 0, "image_type");
$fileContent = @mysql_result($result, 0, "image");
header("Content-type: $fileType");
echo ($fileContent);

hth's

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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