I am a new comer to PHP and also have the fundamentals lower however I've got a pretty large task to complete and extremely take some help getting there.

I'm attempting to make a method that logs when someone is absent or late during the day. And So I curently have a table in a single database which has each customers schedule using their start time, finish time, the times they work, as well as their user id. Then there's another system that logs once they clocked in.

What exactly I have to do loop with the "timeclock" table for that user id, login time, and date. Then compare that towards the info on my schedule table. Whether it finds that for instance Joe Cruz didn't clock in on monday but he's scheduled monday after that it must save he was absent onto another table.

The timeclock and schedule table take presctiption different databases on different servers, and also the absent/late list could be on a single database because the schedule. Any assistance to a minimum of get me pointed within the right direction could be great, thanks ahead of time.

This can be a SQL question, things i understand is you have two schemas. One using the worker info and something using the entry and then leave logs. What you're most likely trying to find to become listed on this two may be the NATURAL JOIN and also the wikipedia entry on the natural join.


SELECT * FROM logs NATURAL JOIN employees WHERE entry > schedule

Assuming both entry and schedule are merely time during the day.