Re: pictures stored in PostgreSQL DB

From: Date: Sat, 03 Mar 2007 12:29:29 +0000
Subject: Re: pictures stored in PostgreSQL DB
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-249765@lists.php.net to get a copy of this message
Alain Roger wrote:
Hi, It's amazing that my previous post has raised so much consideration about the fact to store or not pictures into DB.
It was nice, wasn't it? :-D
However, none of those posts answered to my question... How can i retrieve and display those pictures to my PHP pages ?
??? How do you plan to store them? bytea, text with base64 encoding/decoding, blobs?
Basically, on my PHP page I have some texts and I would like to extract from DB the pictures to display. Therefore, set the header to mine JPEG or GIF does not allow to have text also.
You have to do it in two seperate steps (which IMHO is good): 1) First build an app to extract an image and show it. You should test it with you're browser and it should just show the image. 2) Build you're PHP page and make references in scr of the <img> tag to the app above (referencing with some ID to the JPG you want. I think that you will have to send some headers in one so the the browser knows the length of the image, content type, etc. Not really sure, but it won't hurt to check it out.
So please, how can i do to display pictures from DB, when my PHP page also include texts and other images (from filesystem) ? In fact i would like to do something like a thumbnail...
That's a differnet, and even more complicated story. -- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18 --------------------------------------------------------- Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador ---------------------------------------------------------

« previous php.general (#249765) next »