tp3.2中between的用法


  $year = date("Y");
        $month = date("m");
        $day = date("d");
        $start = mktime(0,0,0,$month,$day,$year);//當天開始時間戳
        $end= mktime(23,59,59,$month,$day,$year);//當天結束時間戳

        $map['user_id'] =$user_id;
        $map['type'] ='1';
        $map['date'] =array('between',array($start,$end));

        $daymoney = M('Log')->where($map)->sum('money');

 


免責聲明!

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



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