List:General Discussion« Previous MessageNext Message »
From:Rudy Metzger Date:July 9 2003 3:24pm
Subject:RE: Is it possible to dump images into a database?
View as plain text  
Use LOAD DATA INFILE if you want to import it from the filesystem or use
INSERT/UPDATE if you do it from an application (e.g. perl, php). Make
sure that the column which stores them is defined as BLOB and not as
TEXT. Look up the BLOB definition for size limitation and variations on
BLOBs.

For getting them out of the DB use SELECT .. INTO DUMPFILE to get them
onto the file system or normal SELECT for applications.

HINT: normally it is MUCH better to store the image on the file system
and only store the path to the image in the database. But this again
depends on what you want to achieve.

Cheers
/rudy

-----Original Message-----
From: Dan Anderson [mailto:dan@stripped] 
Sent: woensdag 9 juli 2003 16:49
To: mysql@stripped
Subject: Is it possible to dump images into a database?

Can anyone point me to a reference on how to insert images into a column
in a mySQL database -- or is that not possible?

Thanks in advance,

Dan Anderson


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=1

Thread
Is it possible to dump images into a database?Dan Anderson9 Jul
  • Re: Is it possible to dump images into a database?colbey9 Jul
RE: Is it possible to dump images into a database?Mike Hillyer9 Jul
RE: Is it possible to dump images into a database?Rudy Metzger9 Jul