Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Not Asking for Code, Just Your Thoughts
Old 11-05-2008, 08:20 PM Not Asking for Code, Just Your Thoughts
Novice Talker

Posts: 11
Name: Alex
Trades: 0
Hi everyone,

I'm setting up a business-to-business website, and I need some advice.

When users login, I want them to have access to a 'section' and they will be able to create 'categories' within that section. Some users will have access to the same section, other will have access to different sections.

How do you recommend I set up my database tables?

Any thoughts would be great. Thanks!
pico204 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-06-2008, 12:16 AM Re: Not Asking for Code, Just Your Thoughts
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
I guess that you should organize it like user groups in unix, but wih a little difference. Every user has unique id and may belong to one or more groups. Every group also has unique id. Every 'section' may be accessed by a number of certain groups.

In this case your tables will be like this:
users: id, name, ...
groups: id, name, ...
ug: user_id, group_id
sections: id, name, ...
sg: section_id, group_id, ...

For perfomance purposes you may cache section-user pairs in separate table and update it when user groups change or group is deleted.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 11-07-2008, 12:21 PM Re: Not Asking for Code, Just Your Thoughts
Skilled Talker

Posts: 85
Name: Ilyes Rhouma
Trades: 0
Hi,
i want to help you, so please explain more aboutthe sections and categories with some examples, that will be very helpfull
__________________
Want a cheap and custom programmer or writer ?
Please login or register to view this content. Registration is FREE

Are you
Please login or register to view this content. Registration is FREE
? Start
Please login or register to view this content. Registration is FREE
free and earning money !
Please login or register to view this content. Registration is FREE
Ilyes is offline
Reply With Quote
View Public Profile Visit Ilyes's homepage!
 
Old 11-09-2008, 02:52 PM Re: Not Asking for Code, Just Your Thoughts
Novice Talker

Posts: 11
Name: Alex
Trades: 0
Thanks for everyone's help.

mtishetsky: I sketched out your table schema and pretty much implemented what you suggested. Thanks!
pico204 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Not Asking for Code, Just Your Thoughts
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.18534 seconds with 12 queries