tp框架如何处理mysql先排序在分组
程序员文章站
2022-06-06 20:45:41
$giModel = M('GroupIntegral'); $gi_table = $giModel->order('id desc')->limit('999')->buildSql();//先排序 $gi_list = $giModel->table($gi_table .'as gi') - ......
$gimodel = m('groupintegral');
$gi_table = $gimodel->order('id desc')->limit('999')->buildsql();//先排序
$gi_list = $gimodel->table($gi_table .'as gi')
->field('gi.*,m.username,m.mobile')
->group('gi.uid')
->join('pre_members m on m.uid = gi.uid')
->select();//在关联分组
下一篇: 17.排序算法---快速排序