I have a table "assignments" with records that are assigned
to multiple "users" by the "department" they belong to. Each user then can
have it's own "status" for each assignment.
When the user logs-in i need to show all his assignments and the status.(but status record doesn't exist yet)
When a new assignment is created I don't want to have to create a new record
relating the assignment to the user. I want the relationship to be by the
department the user belongs to and the department the assignment was assigned
Only thing i can think of is when the user logs in to load the assignments
that belong to the user's department then look thru all the records. For each record
loop thru the status table. If a record exist show the the status. if it
doesn't then make default value and when the users clicks to view the assignment a new status record will be added.
Only thing i don't like is looping thru the status records while looping
thru all the assignments.
How else can I do it? I don't see how could join the assignments table and
the status table if the status record doesn't exist yet.
View Complete Post