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)文章
支持中文字母數(shù)字、自定義字體php驗(yàn)證碼代碼
支持中文字母數(shù)字、自定義字體php驗(yàn)證碼代碼,需要的朋友可以參考下2012-02-02PHP 請(qǐng)求上下文相關(guān)總結(jié)
這篇文章主要介紹了PHP 請(qǐng)求上下文的相關(guān)資料,幫助大家更好的理解和學(xué)習(xí)使用PHP,感興趣的朋友可以了解下2021-04-04PHP中的自動(dòng)加載操作實(shí)現(xiàn)方法詳解
這篇文章主要介紹了PHP中的自動(dòng)加載操作實(shí)現(xiàn)方法,結(jié)合實(shí)例形式詳細(xì)分析了php自動(dòng)加載的概念、原理、實(shí)現(xiàn)方法及相關(guān)操作注意事項(xiàng),需要的朋友可以參考下2019-08-08PHP面向?qū)ο蟪绦蛟O(shè)計(jì)(OOP)之方法重寫(override)操作示例
這篇文章主要介紹了PHP面向?qū)ο蟪绦蛟O(shè)計(jì)(OOP)之方法重寫(override)操作,簡單描述了php面向?qū)ο蟪绦蛟O(shè)計(jì)中方法重寫的原理,并結(jié)合實(shí)例形式分析了php方法重寫相關(guān)實(shí)現(xiàn)技巧與注意事項(xiàng),需要的朋友可以參考下2018-12-12