tpstudent Posted September 6, 2008 Share Posted September 6, 2008 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: This is the staff table which would capture the status in or out of office: Link to comment https://forums.phpfreaks.com/topic/123035-tying-of-database-to-staffs-timetable/ Share on other sites More sharing options...
ankhmor Posted September 6, 2008 Share Posted September 6, 2008 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. Link to comment https://forums.phpfreaks.com/topic/123035-tying-of-database-to-staffs-timetable/#findComment-635369 Share on other sites More sharing options...
tpstudent Posted September 7, 2008 Author Share Posted September 7, 2008 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. Link to comment https://forums.phpfreaks.com/topic/123035-tying-of-database-to-staffs-timetable/#findComment-635640 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.