但是发现不对因为区间查询把年带进去了,而用户生日可能是1986-03-28;
所以只能区间月和日;
另外生日一般都是农历;
求大神指教这种逻辑该如何实现?
$date = strtotime(date('md')); //获取当前年月日并转换成时间戳
$end=strtotime('30 day'); //在当前日期上加30天后
$mswhere['birthday'] = array('between',array($date,$end));
$mswhere['del'] = (int)0;
$Endbir = M('hr_staff')->where($mswhere)->count();
$this->assign('Endbir',$Endbir);
最佳答案
