View Single Post

  #3 (permalink)  
Old 05-20-2008
Geoff Muldoon
 
Posts: n/a
Default Re: Best Way to Store Group Membership

Jerry Stuckle says...
> Paul.Pucciarelli@gmail.com wrote:
> > So I have some 'groups' which 'users' can join. There is no
> > enrollment limit on these 'groups'. How should I store the list of
> > users enrolled in the group?
> >
> > I'd like to be able to quickly determine the groups a user is in, and
> > the users in a group. Seems like a common problem but I can't come up
> > with an effecient solution.

>
> A SQL database. For help on how to design the database, see the
> appropriate database newsgroup.


Most appropriately, yes, but you could put them in a file or files which
populate arrays if you absolutely had to.

And although off-topic, should be in comp.databases.mysql or similar ...

Users: user_id, user_desc, etc.
Groups: group_id, group_desc, etc.
Membership: group_id, user_id, etc.

Geoff M
Reply With Quote