Selecting records based on user

Results 1 to 2 of 2

Thread: Selecting records based on user

  1. #1
    Join Date
    Dec 1969

    Default Selecting records based on user

    I&#039;ll try and explain as succinctly as possible what I&#039;m trying to do. If I&#039;m not clear, please let me know and I&#039;ll try and clarify what I&#039;m trying to do.<BR><BR>I have 3 entities, Users, Companies, and Projects. Each company has multiple projects. Each user has access to specific companies and only specific projects within that company. What I can&#039;t figure out is how to construct the database so I can limit users to seeing only the companies they have access to and the projects with in those companies that they have access to.<BR><BR>I started with 3 tables, which I&#039;ve simplified below:<BR><BR>Users has Username, Password<BR>Companies has CompanyName, CompanyID<BR>Projects has ProjectName, ProjID, CompanyID<BR><BR>The process should be:<BR><BR>1. User logs in<BR>2. A list of accessible companies for that user is displayed<BR>3. Clicking on a company shows a list of accessible projects within that company for that user<BR><BR>I&#039;m totally lost as to how to do this, so any guidance or suggestions are greatly appreciated.<BR><BR>Thanks!<BR>Paul

  2. #2
    Join Date
    Dec 1969

    Default 4th table-UserProjects

    ProjID,UserID<BR><BR>I think you can figure out the rest.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts