What type of field should I use for storing the path; just VARCHAR I guess? And as far as the filenames - make up some random file name for each submitted file?
thanks, Mariusz ps. If storing files in the DB is not common, what exactly is the BLOB type for? ----- Original Message ----- From: "R. Joseph Newton" <[EMAIL PROTECTED]> To: "Mariusz" <[EMAIL PROTECTED]> Cc: "perl" <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 2:13 AM Subject: Re: uploading and downloading files to MySQL > Hi Marius, > > Why do it? Databases are designed for organization of large table and information about the relationships between theri attributes. I would suggest going light, storing only the filename of an image in the db, and stroing the images files themselves as files. > > Joseph > > Mariusz wrote: > > > Hi, > > > > I found some info on how to upload files into a directory on the server and I was able to do that but can anyone tell me how to upload a file to my database (MySQL)? I know to use BLOB for the field type (which BLOB depending on the size) but how do I construct the INSERT or is there a different special sql command just for that? > > I will also need the visitor to be able to download that file and display in the browser (in case of the pic) and download the other type of files (like music) straight to his hard drive. Basically how can I let a visitor download the file from my database? > > > > I'll also greatly appreciate any pointers to some articles on the net. > > > > thank you, > > Mariusz > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]