tp6 exp使用

     $a = ClassesStu::where([
            ['name|major', 'like', '%' . $data['keyword'] . '%'],
            ['id', '>', 'stu_id'],
//            ['id', 'exp', Db::raw('>stu_id')],
            ['ec_id', '=', 184],
        ])->select();
        halt($a->toArray());

['id', '>', 'stu_id']和 ['id', 'exp', Db::raw('>stu_id')]两种写法等价

exp必须配合raw使用

猜你喜欢

转载自blog.csdn.net/qq_58778333/article/details/130150124