查询mysql中的考勤表 [英] query for attendance table in mysql

查看:337
本文介绍了查询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..??

推荐答案

我发现处理这种情况的一种更好的方法是只有一个记录in和a单身记录。桌子很简单:世界卫生组织,什么时候,什么。



什么只是标记打卡和打卡的方式。您可以使用true / false,I / O等。这是因为有人可能忘记打卡或打卡,因此,您可以判断何时检索数据。如果你认为完美,你可以把它留下来。 。 。但我不愿意。



检索数据:现在,您需要做的就是按照WHEN的顺序获取单个WHO的所有数据。





为什么这样?因为您不必花时间(精神上或计算上)决定如何检索现有条目。年代表为您解决了这个问题。
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中的考勤表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆