Re: how to display images stored in DB
| From: | tedd | Date: | Sun, 25 Feb 2007 19:34:48 +0000 |
| Subject: | Re: how to display images stored in DB | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-249407@lists.php.net to get a copy of this message | ||
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, -- AlainAlain: 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