Skip to main content
Participant
July 12, 2006
Question

Graphics in a MySql DB

  • July 12, 2006
  • 1 reply
  • 308 views
I have an image in one of tables, a blob it is visible in the database but, when I bind all the records in dreamweaver, all the the text will show in the browser not the image. why is this? help!
This topic has been closed for replies.

1 reply

Inspiring
July 12, 2006
kabwatha wrote:
> I have an image in one of tables, a blob it is visible in the database but, when I bind all the records in dreamweaver, all the the text will show in the browser not the image. why is this? help!

Because storing images in a database is a thoroughly bad idea. You
cannot just display the image directly from the database, but you need
to create a separate script to display images. The script needs to
create a header containing the correct MIME type for the image
(depending on whether it's a JPEG, PNG, or GIF).

--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
kabwathaAuthor
Participant
July 13, 2006
David,
Do you have the script that you are reffering to? If yes, please send it to me.
Thank you in advance.