时间:2021-07-01 10:21:17 帮助过:7人阅读
SELECT a.,count() as num FROM sys_article a join sys_comment b on a.article_id=b.article_id where a.article_id=20
$Article->field('sys.article.article_id, count(*) as count')->join('__ARTICLE__ ON __COMMENT__.article_id = __ARTICLE__.article_id')->where('sys.article.article_id = 20')->select();