最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

PHP文章按日期(月日)SQL歸檔語句

 更新時(shí)間:2012年11月29日 20:18:05   作者:  
PHP文章按日期(月日)SQL歸檔PHP文章按日期(月)SQL歸檔實(shí)現(xiàn)語句,需要的朋友可以參考下
復(fù)制代碼 代碼如下:

select FROM_UNIXTIME(pubtime, '%Y-%m') as pubtime, count(*) as cnt from articles group by FROM_UNIXTIME(pubtime, '%Y-%m')

PHP文章按日期(日)SQL歸檔
復(fù)制代碼 代碼如下:

select FROM_UNIXTIME(pubtime, '%Y-%m-%d') as pubtime, count(*) as cnt from articles group by FROM_UNIXTIME(pubtime, '%Y-%m-%d')

非時(shí)間戳日期格式歸檔(date_format格式化日期)
復(fù)制代碼 代碼如下:

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
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 `post_status`='publish' group by date_format(`post_date`,'%Y%m%d') order by `ID` desc limit 0,7

相關(guān)文章

最新評(píng)論

晋江市| 开江县| 昌图县| 高平市| 门源| 永丰县| 淅川县| 博湖县| 西充县| 东平县| 莆田市| 新乐市| 安达市| 策勒县| 怀安县| 阿荣旗| 张掖市| 信丰县| 阳江市| 阿巴嘎旗| 聂荣县| 罗甸县| 华安县| 武乡县| 凌源市| 舟曲县| 涟水县| 辽宁省| 进贤县| 广平县| 鄂托克前旗| 铜山县| 新民市| 炎陵县| 博兴县| 海丰县| 海林市| 古丈县| 宜兰县| 元江| 景德镇市|