----- Original Message -----
From: "Anders Thoresson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 09, 2003 1:20 PM
Subject: [PHP] building web album - design questions


> Hi,
>
>   I'm planning to build a web album for my digital photographs, and have
> some questions regarding the design:
>
>   1) Is it better to store the images within the database, or just store
> pointers to the images which is put outside, in the filesystem?

Unless the images are small and easily managed I would recommend to store
the images in the filesystem.  You'll find this method is faster and more
versitile.  A simple script can be written to reconsile the database with
the filesystem should you need to tamper with it.

>   2) At log in, I want to show to which albums new pictures have been
added
> since last visit. For performance reasons, should information about last
> added pictures be added to the database, or is it ok to make a MySQL-query
> each time, comparing the add-date for every picture in every album with
the
> users last log in date?

I don't foresee any bottlenecks here.  Just store the timestamp of the last
login and the timestamp of each upload.  If you're clever you can perform
the comparison with one db query.  Define the timestamp as the index for the
album table and I guarentee speed will not be an issue even with a heavy
traffic load and tens of thousands of entries.

>   3) If I've understood things right, there is functions within PHP that
> can handle picture resizing? Is that correct?

http://www.php.net/manual/en/ref.image.php
Or if you need to get more sophisticated such as adding water-marks and
stuff I recommend you install (or have your ISP install) imagemagick.

Sounds like a fun project.  Good luck!

-Kevin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to