当前位置:Gxlcms > 数据库问题 > Thinkphp field() 数据库查询函数使用

Thinkphp field() 数据库查询函数使用

时间:2021-07-01 10:21:17 帮助过:63人阅读

 

复制代码

9. field group 之后 某一个字段以“,”分割形式展示

->group(id)->field(‘group_concat(score order by `score ` desc) as score‘)复制代码

 

10. group 之后 field 里面查询最新一条里面的数据

->group(‘status‘)->field(‘SUBSTRING_INDEX(group_concat(id order by `id` desc),",",1) as id‘)复制代码

 

文章转载自 https://www.juchengvi.com/looknews/62

Thinkphp field() 数据库查询函数使用

标签:number   The   合法性   end   统计   com   sel   最新   cas   

人气教程排行