tp先排序后分组

Posted pcx105

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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();

 

以上是关于tp先排序后分组的主要内容,如果未能解决你的问题,请参考以下文章