tp5.1 mysql自带函数使用后where如何写

浏览:4982 发布日期:2018/10/22 分类:求助交流 关键字: thinphp5.1,where
比如where条件是这样;$where = [
            'u.isdel'        => 0,
            'u.send'           => 0,
            'u.nextstatus'    => 0,
            'u.belongid'     => self::$info['user_id'],
            'c.ccissend'     => 0,
            'exp' => 'date_sub(curdate(), INTERVAL 7 DAY) <= date(c.ccnexttime)', 
        ];
生成的sql 前面几个没问题,但是 exp 这个不是字段,实际效果应该生成 and  date_sub(curdate(), INTERVAL 7 DAY) <= date(c.ccnexttime) 然而解析成了字符串,这有个毛用,但是不像tp3.2中 '_string' => 'date_sub(curdate(), INTERVAL 7 DAY) <= date(c.ccnexttime)'可以直接生成,请问有什么办法解决
最佳答案
评论( 相关
后面还有条评论,点击查看>>