如果你对该文章中的内容有疑问/不解,可以点击此处链接提问
要注明问题和此文章链接地址 点击此处跳转
<code class="">$list = Db::query("SELECT
u.*,
(select count(1) FROM zf_post where uid=u.id and `status`=1) as p_count,
(select count(1) FROM zf_like where uid=u.id) as l_count,
(select count(1) FROM zf_comment where uid=u.id) as c_count
FROM
zf_user u
GROUP BY p_count+l_count+c_count DESC");
</code>