tp框架如何处理mysql先排序在分组
程序员文章站
2023-10-30 21:53:40
$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();//在关联分组
上一篇: 笑话集原创笑话精品展第121期
下一篇: 聊一聊PHP的global