Page 1 of 1

uploading to mysql

Posted: Tue Mar 01, 2005 12:02 pm
by jrmontg
Is it possible to upload files to mysql?

If so, how large can the file be.

Are there advantages/disadvantages to doing this?

Thanks

Posted: Tue Mar 01, 2005 12:08 pm
by feyd
yes. read up on BLOB type: http://dev.mysql.com/doc/mysql/en/blob.html

A disadvantage is it requires you to make a database query for each one seperately. Another is increased overhead and work due to transfering the data out of mysql and then sending it to the client. If you want to store images, we'd suggest you store them in the file system and potentially store the filename for output to the browser.