uploading to mysql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jrmontg
Forum Newbie
Posts: 12
Joined: Mon Apr 05, 2004 9:59 am

uploading to mysql

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply