View Single Post
Old 01-06-2013, 08:04 PM   PM User | #4
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,504
Thanks: 45
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
Quote:
Originally Posted by mlseim View Post
Is there a reason why you want to store the images in the database (BLOB) and
not store the images in a directory and use the table for storing the image filenames?

In other words, do you really need to store the images/photos in your database table?
Believe it or not storing in a db can actually be a better idea. Say you delete a user from the DB and then their images from the disk. If you do a rollback, the users account can be restored but those images that were wiped from the system are gone for good!

Of course then you have the problem of a swelling mysql table
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote