select count(*) as count,FROM_UNIXTIME(addtime,'%m') from download where FROM_UNIXTIME(addtime,'%Y') = '2014' group by FROM_UNIXTIME(addtime,'%m') //运行结果 /* 总和 月份 76 01 99 02 95 03 172 04 234 05 153 06 52 07 */
转载请注明:谷谷点程序 » mysql获取每个月发表的文章统计
select count(*) as count,FROM_UNIXTIME(addtime,'%m') from download where FROM_UNIXTIME(addtime,'%Y') = '2014' group by FROM_UNIXTIME(addtime,'%m') //运行结果 /* 总和 月份 76 01 99 02 95 03 172 04 234 05 153 06 52 07 */
转载请注明:谷谷点程序 » mysql获取每个月发表的文章统计