Uploading image and files to MYSQL Database?

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
rajsekar2u
Forum Commoner
Posts: 71
Joined: Thu Nov 20, 2008 4:23 am

Uploading image and files to MYSQL Database?

Post by rajsekar2u »

Is it good to upload images and other files to database rather than storing it in a folder.
Will this affect the performance of mysql server?

Which one is best to use?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Uploading image and files to MYSQL Database?

Post by califdon »

In most circumstances it is probably best to store images in a folder, with paths stored in the database. There are several circumstances that might convince you to just store the images in the table, though. If there are only a small number of images, or the images are quite small, the performance would probably not be impacted. At least that has been my experience.
Post Reply