Page 1 of 1
Image in Postgres
Posted: Tue Jan 13, 2004 3:05 am
by phppick
How to Store Image in Postgres Database? Which DataType i need to Use. I am using Postgres 7.4
How to retrive it to display in Web, I am using PHP.
Thanks
Posted: Tue Jan 13, 2004 4:52 am
by markbeadle
Not sure of the answer but a quick question..
Do you really need to store the image within the database or should you store a pointer and image details within the database and use the filesystem to store the image itself ?
Just an alternative
Posted: Tue Jan 13, 2004 10:02 pm
by fractalvibes
Use a BLOB to store images. Could be more efficient to just store the link the the image in the database - depends upon the circumstances.
To retrieve, just query the database as usual, and have a script that handles retrieval, setting a header with the proper content type.
fv
Thank you
Posted: Wed Jan 14, 2004 3:19 am
by phppick
Thanks for the Help