On Mon, 7 Oct 2002, Carolina Barrios wrote: > I need to load a graphic file, especify, files .gif and .jpg. in MySQL. > Is posible this in MySQL? how? Is a normal file?
Yes, it is possible using the BLOB / MEDIUMBLOB / LONGBLOB family of MySQL data types, but convention wisdom seems to be that it's generally easier to just store the images as conventional files, and put the filesystem paths to those files in as regular character data in the database. So for example instead of storing a jpg photo, save as /var/foo/images/bar.jpg and keep that text in whatever database table. This arguably takes a little more overhead to set up -- purists would argue that it's wrong to keep data external to the database -- but once you get it set up this should generally be easier to manage. But if you really need to store data (in Perl, I assume?) then it's worth looking at a good DBI reference. I'll see if I can find some sample code if this is really the approach you need to take. -- Chris Devers [EMAIL PROTECTED] Q: What do agnostic, insomniac dyslexics do at night? A: Stay awake and wonder if there's a dog.