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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

storing/retreiving images using mySQL and Perl

Status
Not open for further replies.

mikej

Programmer
Jan 12, 2000
5
US
Hi,<br>
<br>
Im wondering where I can get more inforamtion on how to store and retreive images in a mySQL database using SQL from <br>
within Perl scripts. Is this something that is wise, or would it be better to store the images/binary info directly on the web <br>
server and then have a URL that points to the image in the database? Does anyone know of a tutorial that shows how to <br>
upload images and other binary data into a mySQL database and then retreive them? Thanks for any help!<br>
<br>
mike <p>Mike Judkins<br><a href=mailto:mikej@1185design.com>mikej@1185design.com</a><br><a href= program now!"
 
Definitely better to simply store the image as a file on the server and save the URL as the record. Actually I don't even save the full URL most of the time. I simply record the filename as a number, without an extension, so the records are small, and I let my PHP script handle the URL. As long as your script decides where the files are saved, the only thing the database needs to know is the filename, or even just part of it (---.jpg)<br>
<br>
Since my experience is with PHP, i'm not sure just how it would work with Perl, but it's probably fairly simple.<br>
<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top