<BR>select FROM_UNIXTIME(pubtime, '%Y-%m') as pubtime, count(*) as cnt from articles group by FROM_UNIXTIME(pubtime, '%Y-%m') <BR>
PHP文章按日期(日)SQL归档
<BR>select FROM_UNIXTIME(pubtime, '%Y-%m-%d') as pubtime, count(*) as cnt from articles group by FROM_UNIXTIME(pubtime, '%Y-%m-%d') <BR>
非时间戳日期格式归档(date_format格式化日期)
<BR>select date_format(`post_date`,'%Y%m%d') as pubtime, count(*) as cnt from wp_posts where `post_status`='publish' group by date_format(`post_date`,'%Y%m%d') order by `ID` desc <BR>select date_format(`post_date`,'%Y%m%d') as pubtime,date_format(`post_date`,'%m 月 %d 日') as shijian,count(*) as cnt from wp_posts where `<p style="color:transparent">2本文来源gao!daima.com搞$代!码网</p><span>搞代gaodaima码</span>post_status`='publish' group by date_format(`post_date`,'%Y%m%d') order by `ID` desc limit 0,7 <BR>