Going to disagree there... I'd use a seperate dir for each user,
identified by their id.  You can keep the original filename then for each
uploaded picture.  If two users have a family.jpg then you won't end up
with any collisions.  Something like:

photos/1/family.jpg
photos/2/family.jpg

Manipulating directories which have a huge number of files can be
cumbersome at times... at least it has been in my experience with some
Linux machines.  I once threw 16,000+ .gif files into a single dir and the
standard GNU tools have trouble manipulating things like that.  For
instance, an 'rm *' won't work.. you need to script it in some way file by
file.

Just my two cents.

Justin Buist
Trident Technology, Inc.
4700 60th St. SW, Suite 102
Grand Rapids, MI  49512
Ph. 616.554.2700
Fx. 616.554.3331
Mo. 616.291.2612

On Tue, 21 Aug 2001, Rick Emery wrote:

> I vote for a single directory.  Then use Sheridan's naming suggestion.
>
> Richard Emery
> Excel Communications, Inc.
> IT Sr. Project Manager
> (972) 478-3398
> (972) 944-0542 (pager)
>
> There is no "trying"...
> There is only "Do" or "Not Do"
>
>
>
> -----Original Message-----
> From: Jeff Oien [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 21, 2001 10:49 AM
> To: PHP-DB
> Subject: RE: [PHP-DB] Photo Album Schema
>
>
> I should have said photo_filename. That was what I intended to do.
> Would you suggest one directory for all photos or separate directories
> for each user?
> Jeff Oien
>
> > Rick: I don't see any .php tags there... plus just because someone
> > else has done it doesn't mean he can't do it as well  =)
> >
> > Jeff: The only critique I would give from the description you have
> > given us thus far is the fact that you appear to be storing the photo
> > in the DB.
> >
> > The biggest bottleneck in a server-side script is usually the DB calls.
> > With this in mind, you want to limit these calls as much as possible.
> >
> > I would suggest setting up a naming and/or directory scheme to store
> > the pictures on the website, and then store the URL of the picture in the
> > DB, rather than the image itself.
> >
> > Then when outputing the page just do something like
> >
> > echo "<Img src=\"$queryresult['location']\">";
> >
> > Sheridan Saint-Michel
> > Website Administrator
> > FoxJet, an ITW Company
> > www.foxjet.com
> >
> > ----- Original Message -----
> > From: "Rick Emery" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; "PHP-DB" <[EMAIL PROTECTED]>
> > Sent: Tuesday, August 21, 2001 10:19 AM
> > Subject: RE: [PHP-DB] Photo Album Schema
> >
> >
> > > This has been done.  see http://www.photopoint.com
> > >
> > > This is a free service available to the public.
> > >
> > > rick
> > >
> > > Richard Emery
> > > Excel Communications, Inc.
> > > IT Sr. Project Manager
> > > (972) 478-3398
> > > (972) 944-0542 (pager)
> > >
> > > There is no "trying"...
> > > There is only "Do" or "Not Do"
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Jeff Oien [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, August 21, 2001 10:12 AM
> > > To: PHP-DB
> > > Subject: [PHP-DB] Photo Album Schema
> > >
> > >
> > > I want to make a photo album that will have users who sign up
> > > to create an album and then have the albums open to the public.
> > > I was thinking of doing it like this but I've never done a relational
> > > database before so if anyone thinks of anything I should change
> > > please let me know. Thanks.
> > > Jeff Oien
> > >
> > > Table1:
> > > -username
> > > -password
> > > -album_title
> > > -creation_date
> > > -id
> > >
> > > Table2:
> > > -id (from Table1)
> > > -photo (jpg or gif)
> > > -date
> > > -photo_title
> > > -description (limited length)
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to