前辈们,师兄们,我在比较时间的问题上被困扰住了,特别需要你们帮助,拜托你们帮帮我! strtotime("2015-01-26 09:00:00");strtotime("2015-01-26 17:30:00");时间戳不就来了么 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 // 获取时间的小时, H是24小时制 根据H来判断是否迟到,至于5点半的,再比较分钟就可以了吧,这样就不用每天都要生成时间戳了date('H', $timestamp) echo date('h', strtotime("2015-01-27 09:01:10")); //9点 echo date('i', strtotime("2015-01-27 09:01:10"));//01分 记录数据的同时判断迟到和早退,并作为一个新字段保存当天9点的时间戳:strtotime(date('Y-m-d') . ' 09:00')跟time()对比就可以了 create table ts_user(wxname varchar(50) not null primary key, name varchar(50) not null,telnum char(11) not null unique,email varchar(50) unique,address varchar(100))ENGINE=InnoDB DEFAULT charset=utf8;create table ts_signin(signid int not null auto_increment primary key, wxname varchar(50) not null, sdate int(10) not null,chidao int(1) default 0, // 1迟到,0没有迟到 int或bool 类型都行edate int(10) not null,zaotui int(1) default 0, //1早退,0没有早退, location varchar(100) not null // 这是干嘛的不知道)DEFAULT charset=utf8;直接select count(chidao ) as chidaoa from ts_user,ts_signin, where ts_signin.wxname =ts_user.wxname and (1个月的判断)类似这个就行, 每天加1条数据, 迟到,早退,都知道, 记得在每天晚上12点刷新, 没有签到,的,列为迟到, 或早退,插入数据段时候直接 写入chidao, 早退判断 PHP购物车 求页面上实现翻牌效果源码 关于获取input type='file'的大小问题 想做一个公益性知识性的网站,大家有没有比较好的方案推荐一下 急救php php木马扫描网站文件,类似dedecms中的木马检测工具,有做的吗? PHP 个人中心数据库怎么设计呀?求高手指点思路! PHP游戏的同时在线人数如何统计 discuz X3.1 发贴时修改会员积分的是哪个文个的哪行代码 tp5 微信支付回调notify 求php远程抓取的代码,实在研究不出来了 vpn 代理访问google
// 获取时间的小时, H是24小时制 根据H来判断是否迟到,至于5点半的,再比较分钟就可以了吧,这样就不用每天都要生成时间戳了
date('H', $timestamp)
echo date('h', strtotime("2015-01-27 09:01:10")); //9点
echo date('i', strtotime("2015-01-27 09:01:10"));//01分
当天9点的时间戳:strtotime(date('Y-m-d') . ' 09:00')跟time()对比就可以了
(wxname varchar(50) not null primary key,
name varchar(50) not null,
telnum char(11) not null unique,
email varchar(50) unique,
address varchar(100)
)ENGINE=InnoDB DEFAULT charset=utf8;create table ts_signin
(signid int not null auto_increment primary key,
wxname varchar(50) not null,
sdate int(10) not null,
chidao int(1) default 0, // 1迟到,0没有迟到 int或bool 类型都行
edate int(10) not null,
zaotui int(1) default 0, //1早退,0没有早退,
location varchar(100) not null // 这是干嘛的不知道
)DEFAULT charset=utf8;直接select count(chidao ) as chidaoa from ts_user,ts_signin, where ts_signin.wxname =ts_user.wxname and (1个月的判断)
类似这个就行,
每天加1条数据, 迟到,早退,都知道, 记得在每天晚上12点刷新, 没有签到,的,列为迟到, 或早退,插入数据段时候直接 写入chidao, 早退判断