前辈们,师兄们,我在比较时间的问题上被困扰住了,特别需要你们帮助,拜托你们帮帮我! 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, 早退判断 寻个sns类cto创业合作伙伴 phpcms如何进行团队开发 PHP 做计算题 很急关于查询数据库过滤的问题 iis伪静态 PHP学习资料和源码大全 如何在zendstdio中加入aptana插件 求大侠帮忙将Apache Rewrite改成 Nginx Rewrite配置,万分感谢! url 重写不成功,只能打开主页,其他打开都是404报错 请问我从一个网页把验证码爬取过来,但只能适用于单用户,该怎样让它适用于所有访问用户? 求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, 早退判断