tp 按指定字段指定顺序排序

it2025-10-14  8

$top_list = self::where($where)->column('id'); //排序 $exp = new \think\Db\Expression('field(p.id,' . implode(',', $top_list) . '),p.create_time DESC'); //按指定顺序查询 $publish_list = self::alias('p') ->order($exp) ->select();
最新回复(0)