Adding an image to a database table?
Posted: Thu Oct 26, 2006 10:58 pm
Can someone please tell me what data type I should use to add an image to a database? Thanks in advance.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Images in databases, are NOT recommended, and I'm pretty sure its Blob, if you still continue on with it...cturner wrote:Can someone please tell me what data type I should use to add an image to a database? Thanks in advance.
Why? its been said many times, and instead of explaining again.....cturner wrote:Why aren't images in databases recommended? How can I show an image for each product when there are a lot of images to be displayed? I have tried BLOB and nothing is displaying.
viewtopic.php?t=37077feyd wrote: But it is not recommended. Why? In order to display the image, you'll have to make a reference to a PHP script as the image. This reference will need to query and extract the binary data from the database server. This causes more server load than is necessary. Instead, it is often suggested to use the filesystem to store the files. That's what it's built for.
If you want to read previous threads on this, use the search *blob* as the keyword string (with the both asterix)