Solution - Problems when deleting a row

scrub55434

New member
Local time
Today, 09:17
Joined
Jul 1, 2005
Messages
7
Link to the original thread

I have realized what I was doing wrong and thought that I would post the solution in case anyone else does the same trying to implement security. First off thanks Pat Hartman for the input. You were right on there needing to be a cutoff and now one is added that ensures they can't edit punches after payroll has started.

I had the right idea with the many to many relationship to get a list of buildings. What I was doing wrong was joining the resulting table to the shifts table. Instead the correct way (well, it works anyways) is include WHERE Building IN (SELECT ....) in the sql where the select statement gets the list of buildings numbers that I have access to.

Now the list is limited to the buildings that they have access to and when you delete only the shift table is affected because none of the other tables are joined.
 

Users who are viewing this thread

Back
Top Bottom