Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to retrieve BLOB from db 1

Status
Not open for further replies.

TyzA

Programmer
Jan 7, 2002
86
BE
Hi,

I have this cgi script (perl) which has to retrieve an image from the database. This image is stored in a column of the blob datatype of a Mysql database (using DBI).

Can I just do this by using a reguler select query?

Once I have retrieve the blob from the database, how can I display it in my webpage.

Is it possible to show me an example.

Thanks in advance.
Tijs
 
Retrieve it as normal

The best way to make it show up is to call the CGI as the img parameter

img src="myimage.cgi"

There may be other ways to do it but they really are a pain.

Generally speaking ,there is zero reason to put images in a database. Put them on disk and put the file path in the DB..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top