您当前的位置: 首页 >  搜索

苗先生的PHP记录

暂无认证

  • 0浏览

    0关注

    190博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

ThinkPHP搜索7天15天30天数据where语句

苗先生的PHP记录 发布时间:2022-07-12 09:57:30 ,浏览量:0

$pending_times = [
            // 7天
            1 => [['pend', '=', strtotime(date('Y-m-d 23:59:59', time()))]],
            // 15天
            2 => [['pend', '=', strtotime(date('Y-m-d 23:59:59', time()))]],
            // 30
            3 => [['pend', '=', strtotime(date('Y-m-d 23:59:59', time()))]],
            // 90
            4 => [['pend', '=', strtotime(date('Y-m-d 23:59:59', time()))]],
        ];
        if ($pending) {
            // 根据前端的索引搜索
            $where[] = $pending_times[$pending];
        }

关注
打赏
1665468453
查看更多评论
立即登录/注册

微信扫码登录

0.0407s