tp先排序后分组

$dialModel = new dialModel();
$dialTable = $dialModel->order('num desc')->buildSql();//先排序
$list = $dialModel->table($dialTable .'as d')
    ->join(AMem::tableName('m'), 'd.user_id=m.id')
    ->field($field)
    ->where($where)
    ->group($group)
    ->order($order)
    ->cache($cn, 300)
    ->limit(10)->select();

 

posted @ 2019-12-27 11:36  pengcx  阅读(1728)  评论(0编辑  收藏  举报