2011-08-19 75 views

回答

0

您选择数据库的count(*),它会给你你需要的行数。

SELECT count(*) as count FROM `comment_table` GROUP BY `listing_id`; 
+0

他想每次上市,你需要群组 –

+0

@Derek更正之前,你发布此评论:)(请删除-1) –

2
select listing_id, count(*) 
from table 
group by listing_id 
+0

即时通讯初学者...我如何打印? –