[Next in line] How do I set this up?

admin

Administrator
Staff member
I have two tables:

WORKSHOP
----------
Workshop_ID (auto_incrementing field)
Name
Description
Date_Started
Total_Members
Admin_Name
Admin_ID

WORKSHOP_MEMBER
-------------------
Wk_Memb_ID (auto_incrementing field)
User_ID
Workshop_ID
Member_Name
Administrator (1 if yes, 0 if not)

Here's how I have it set-up: There's a maximum of 10 members per workshop. A site user can fill in the appropriate form to create a new workshop. After the user gets done creating the workshop, two enteries in two separate tables are added (see above), one is for the new WORKSHOP, the other is the WORKSHOP_MEMBER. The person who created the workshop is designated the Administrator(1). Anyone who joins after him/her is just a regular workshop member and is added to the WORKSHOP_MEMBER table, with a 0 in the Administrator field.

Now here is where it gets tricky... If the adminstrator leaves the group, I want the next person who joined to become the admin. How should I set this up? Can I go by the highest Wk_Memb_ID && Workshop_ID? or is there another way?


thanks in advance,
Sadia
 
Top