Jump to content

Tying of database to staff's timetable


tpstudent

Recommended Posts

Hi,

 

I am creating a staff directory board whereby it would show the status of the staff whether they are in or not. However, i would need to tie the timetable table to the status whether they in or not. Meaning if the timetable shows that the staff is having lessons, it would turn the status to out. When the timetable shows that they do not have lessons , then the status would set to off.

 

This is example of how the timetable columns in the database:

Picture5.png

 

 

This is the staff table which would capture the status in or out of office:

staff.jpg

Link to comment
https://forums.phpfreaks.com/topic/123035-tying-of-database-to-staffs-timetable/
Share on other sites

The way the script should work is (my guess):

1. You get the name and the id from the last (second) table.

2. You search the first (top) table for the id

3. Then get the current time and if its inbetween the lesson time u show that the staff is busy.

 

If this is right and you need coding help then pm me.

Hi, I feel the way you suggested is logical. I am able to select the name and the id from the last table. Currently, I need help for codings is point number 2 and 3 which means able to search for the staff id from the first table and also getting the current time and see if its between the lesson time to show that the staff is busy. Thanks for replying.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.