zoukankan      html  css  js  c++  java
  • TP5where 查询时间戳 范围数据

             $monday = strtotime(date('Y-m-d', strtotime("this week Monday", time())));
             $Tuesday = strtotime(date('Y-m-d', strtotime("this week Tuesday", time())));
             $Wednesday = strtotime(date('Y-m-d', strtotime("this week Wednesday", time())));
             $Thursday = strtotime(date('Y-m-d', strtotime("this week Thursday", time())));
             $Friday = strtotime(date('Y-m-d', strtotime("this week Friday", time())));
             $Saturday = strtotime(date('Y-m-d', strtotime("this week Saturday", time())));
             $Sunday = strtotime(date('Y-m-d', strtotime("this week Sunday", time())));
             
         
    
                
    $monday= Db::name('inquiry_allocation')->where('createtime','>=',$monday)->where('createtime','<=',$monday+24*3600-1)->count();
    $Tuesday= Db::name('inquiry_allocation')->where('createtime','>=',$Tuesday)->where('createtime','<=',$Tuesday+24*3600-1)->count();
    $Wednesday= Db::name('inquiry_allocation')->where('createtime','>=',$Wednesday)->where('createtime','<=',$Wednesday+24*3600-1)->count();
    $Thursday= Db::name('inquiry_allocation')->where('createtime','>=',$Thursday)->where('createtime','<=',$Thursday+24*3600-1)->count();
    $Friday= Db::name('inquiry_allocation')->where('createtime','>=',$Friday)->where('createtime','<=',$Friday+24*3600-1)->count();
    $Saturday= Db::name('inquiry_allocation')->where('createtime','>=',$Saturday)->where('createtime','<=',$Saturday+24*3600-1)->count();
    $Sunday= Db::name('inquiry_allocation')->where('createtime','>=',$Sunday)->where('createtime','<=',$Sunday+24*3600-1)->count();
                
    

      

  • 相关阅读:
    HCIA-Storage:第五章 常用存储协议介绍
    HCIA-Storage:SAN基础业务配置和使用:IPSAN,FCSAN
    RH2288v3常用的知识
    不常见的RAID,RAID2,RAID4,RAID7
    华为存储设备管理ip修改
    HCIA-Storage:第七章存储可靠性
    HCIA-Storage:第四章存储系统结构
    SSH服务见解
    shell学习笔记之正则表达式
    shell学习笔记之crontab
  • 原文地址:https://www.cnblogs.com/web928943/p/14951367.html
Copyright © 2011-2022 走看看