mysql考勤查询,查询mysql中的考勤表
I m doing project on attendance management systm..the problem is that in this project..how i insert the arrival or departure time in same row in two different times..
what should be the query for this..??
解決方案I have found that a better way to handle this type of scenario is to have only a single record for in and and a single record for out. The table would be very simple: WHO, WHEN, WHAT.
WHAT is simply a way of marking punch-in and punch-out. You can use true/false, I/O, or whatever. This is because someone may forget to punch in or out, and thus, you can tell when you retreive the data. If you assume perfection, you could leave this out . . . but I wouldn't.
Retrieve Data: Now, all you need to do is get all data for a single WHO, in order of WHEN.
Why this way? Because you don't have to spend the time (mentally or computationally) deciding how to retreive an existing entry. Chronology takes care of that for you.
總結
以上是生活随笔為你收集整理的mysql考勤查询,查询mysql中的考勤表的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 机器人学导论第三章
- 下一篇: 机械工程专业英语词汇