in reply to blob field

Depending on the database implementation, storing binary data like images doesn't work well. I would suggest storing a URI for that image, and using your script to do the heavy work of fetching that file. amt.

Replies are listed 'Best First'.
Re^2: blob field
by Mr_Person (Hermit) on Aug 11, 2004 at 21:57 UTC

    I've had good luck storing images in a PostgreSQL database using the bytea data type. Take a look at the bind_param section of DBD::Pg for more details on how to do it.

    As a handy trick for pulling the images back out and displaying them without knowing the file extension, use File::MMagic to figure out the what kind of image it is. I used this to specify the header type on a CGI application that retrieved stored images.

    However, if you're going to be storing a lot of images or speed is a concern, you're probably better off following amt's advice.