I’m working on a web app that tracks workers check in and check out times to certain rooms. I have multiple employees, multiple rooms, and check in and check out times for each room. Everytime a worker enters or leaves a room, they scan a QR code that has an ID variable in a URL for that room; I need to record the room, date/time, the employee name, and if it was in or out.
One way is to make one table like:
Room | Employee | Time | InOrOut |
The data will be entered into database like:
Mens Room, Joe, 6/29 7:30, In
Womens Room, John, 6/29 7:35, In
Mens Room, Joe, 6/29 8:00, Out
Womens Room, John, 6/29 8:05, Out
And I want to view it like:
Mens Room, Joe, 6/29 7:30, In
Mens Room, Joe, 6/29 8:00, Out
Womens Room, John, 6/29 7:35, In
Womens Room, John, 6/29 8:05, Out
I want to view data ordered by check in time, but have the following row be the next check out time for that room.
Create two look up table..
And one reference table..