Re: [PHP-DB] Re: Photo Album Schema

2001-08-24 Thread Bill Zeller

Hi,

By saying id.gif, I obviously didn't mean the id of
the user, I meant the unique id of the image.

I assumed the person making this was going to have one
table setup like so:

id (unique id)
owner
name
description
jpg_or_gif, etc

Then a table with authors..

id
name
pass
email
etc

with author.id = picture.owner

I see no downside to doing that and it seems to be a
relatively effecient way to ensure the uniqueness of
all image names.

Best Regards,
Bill Zeller
--- Sheridan Saint-Michel [EMAIL PROTECTED]
wrote:
 I don't know if having multiple users associated
 with a single image is
 at all beneficial, and I can see where it might
 cause all sorts of problems.
 
 For example, you and I both have the same image in
 our album (we are
  both assciated with it in the DB).  What happens
 when I change the
 description?  Do you change the description field,
 thus changing the
 description on both our pages?  Do you now have to
 create another entry
 in your Image table?  In effect anytime I change the
 description either both
 of us have to live with my new description or you
 have to do a lot of work
 around code (checking to see if more than one person
 is associated with the
 image, Adding a new entry into image, changing all
 my info to reflect the
 new
 Image_Name) to avoid this.
 
 Therefore, I think for this project, the original DB
 structure works much
 better.
 
 Sheridan Saint-Michel
 Website Administrator
 FoxJet, an ITW Company
 www.foxjet.com
 
 - Original Message -
 From: grant [EMAIL PROTECTED]
 To: Sheridan Saint-Michel [EMAIL PROTECTED]
 Cc: Bill Zeller [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Thursday, August 23, 2001 1:48 PM
 Subject: Re: [PHP-DB] Re: Photo Album Schema
 
 
  The most useful schema would be to have the name
 of the document be system
  generated, like i123456789.img and make the
 database as follows:
 
  Image
  Image_Name varchar(50) primary key
  Original_Name varchar(50)
  Description text
 
  User
  User_ID int8 primary key
  Login char(8) uniques index
  password varchar(50) encrypted
 
  relation
  User_ID
  Image_Name
 
  Now you have duplicate anems OK, multiple users
 associated with any
  picture.  You just rename the file as it comes and
 goes.
 
 
 
 -- 
 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]
 


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-- 
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]




Re: [PHP-DB] Selecting number of news items on frontpage

2001-02-28 Thread Bill Zeller

Hey,

If you're using Mysql to store the items, you could
use the Limit statement to limit the number of items
displayed. If you're using the file system it'd
probably be a little more difficult, but not
impossible. For example, if the news items were stored
in a text file with one entry per line, you could just
use file() to convert the file to an array and then
loop 7 times--grabbing the first 7 elements (or news
items) of the array.

Best Regards,
Bill Zeller
--- Matthew Cothier [EMAIL PROTECTED]
wrote:
 I have a homepage which has a news headline system.
 Bascially via form the 
 admin of the site can submit news which appears on
 the front page, the only 
 problem is the news just keeps coming and I have a
 front page with too many 
 headlines on.
 
 How can I make it so that say 7 articles appear on
 the front page and the 
 rest can be accessed through some sort of archive?
 
 Perhaps a link underneath these articles to the
 archive?
 
 And the actual archive a page with the headlines
 listed that they can click 
 on and view the story, the headlines listed in date
 order.
 
 How would I do this?

_
 Get Your Private, Free E-mail from MSN Hotmail at
 http://www.hotmail.com.
 
 
 -- 
 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]
 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
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]