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();
            

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM