Reply
Old 06-16-2014, 10:05 PM   #1 (permalink)
 
Status: Junior Member
Posts: 12



Default mysql - projects table and sharing projects

I'm working on creating a web application using PHP/MySQL. Basically, now I have a table called members for registered users. Each of these members can then create projects. To store this user to project relationship, I have to create a project table. Every project will have a unique ID and there will be one other column which stores the project owner information.

The twist comes in when the owner wants to share the results of the project with other members. I have to create another table that contains that information. Should I do this in a project-centric way, where I have the projects and each column represents a member with access? Or should I do this in a member-centric way, where I have the user and each column represents the projects they have access to? How would I go about doing these methods and connecting these different tables (which are all within the same MySQL database)?

Please help ASAP!!!!! 10 points to the best answer! Thanks folks :)

TEEN is offline   Reply With Quote
Old 06-16-2014, 10:05 PM   #2 (permalink)
 
Status: Senior Member
Posts: 754



Default mysql - projects table and sharing projects

It doesn't matter which way you do it--you will need a third table that will store the relationship between the member_id and the project_id. Just create a new table called project_permissions:

member_id, project_id

And whenever a user tries to access another project, just execute a query to verify the user has access to that project (via the project_permissions table)
JeffP is offline   Reply With Quote
more..

Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
are you php/mysql programmer...wanna do projects together: Build a team!!? Muhammad MySQL Databases 1 03-23-2013 07:06 AM
where can i find fully complete php projects with mysql for college work? prantik PHP Code/ PHP Codes 0 02-20-2013 10:05 PM
Can I use one mySQL database for multiple (different) projects? Edward MySQL Databases 3 11-19-2012 09:54 PM
Where can I find a local and independent php/mysql developer looking for freelance projects? Unknown_User Web Developers 2 07-12-2012 10:36 AM
iMovie shared projects and exported projects are really bad quality, help? Unknown_User Computer Programming 1 12-22-2011 10:07 AM