ThinkPHP6 orderRaw 自定义排序规则


           $res = Db::table('wl_integral')
                ->alias('i')
                ->join('travel t','i.tid = t.id')
                ->field('i.id,i.item,i.file,i.rule_id,i.score,i.status,t.title')
                ->orderRaw('field(i.status,0,1,-1)')
                ->where($map)
                ->paginate($limit,false);


最新回复 (0)
发新帖