Helpful Information
 
 
Category: MySQL and other databases
Photo database

Hi all,

Am new to web design and getting along very nicely (well, on my 4th site, I code by hand, use pure external css to layout pages and how they look, and have managed to work it for most browsers, self taught in 6 months so doing ok...fast learner!!).

I have built a site for a friend for his photography business. He has requested he would like to be able to put a clients photos online for them to view only their images and no-one else to get access.

1st of all, i've no-experience in databases, so how difficult would it be to do one, and give him the power to apply his pictures for each client and upload them or whatever. He is also talking about making them log in so they can view their images only and not have them open for everyone else to view.

How could i achieve something like this.

geoffb

Yes storing of images using databases is possible which i think an efficient way of storing images.

Most of the new generation database packages supports some data types BLOB - Binary Large Object for this purpose.

If you are intending to do this job with PHP and MySQL, then please checkout the following links which will give some fairly good idea about handling insertion and retrieval of images in database.

Using a user management mechanism, you can restrict the user from viewing other members images also.

http://www.developerfusion.co.uk/show/2667/

http://codewalkers.com/tutorials/35/1.html

http://www.wellho.net/solutions/php-example-php-form-image-upload-store-in-mysql-database-retreive.html

although you certainly can store the image in the database, and if you talk to 10 different programmers you will probably come up with 10 different answers.

a technique that I use [dailiy] is to store the filename in the database and then just hit the database retieving the filename and then write the img tag. This is probably your best bet.

I would agree with penguin. I also just store the path. It makes it a lot easier to manage plus the database size doesn't get out of hand.

I would agree with penguin. I also just store the path. It makes it a lot easier to manage plus the database size doesn't get out of hand.

This method is very simple considered to the method in which we store the images in the database.

But i think if large number of images are involved then it would be better to store them in database.

No... the more images the WORSE it is to store them in the database.
It will slow things down and just become a mess.
Store the URL... please...










privacy (GDPR)