Calculation Help

I am stuck on a calculation or table set up to get the appropriate calculations out of it... Looking for a little bit of guidance here.

Current Table we will call it Shift Exchange....

Elements
Employee Requesting trade (userid)
Employee Accepting trade (userid)
Start Time (date)
End Time (date)
Total Hours (calc that calulated total hours)

Lets Say that this data is entered into the db inside this table....

Requester Acceptor Total Hours
106 1283 12
1283 106 6
116 1283 12
1283 1109 24

Now when user 1283 logs in I want them to be able to see a table showing who owes them time.... So user 1283 would see.

Employe Total Time Owed to Me Total Time I Owe
106 6 hours 0 Hours
116 12 hours 0 Hours
1109 0 hours 24 Hours


User 1109 would see

Employe Total Time Owed to Me Total Time I Owe
1283 0 Hours 24 Hours

I am trying to figure out the best way to accomplish this?
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top