thinkphp中怎么用group和count查询三篇文章各自的评论数

2025-04-06 16:04:01
推荐回答(1个)
回答1:

select post_id,count(*) from 评论表 where post_id in (文章id1,...) group by post_id