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)文章
關(guān)于JSON以及JSON在PHP中的應(yīng)用技巧
這篇文章主要介紹了關(guān)于JSON以及JSON在PHP中的應(yīng)用技巧。需要的朋友可以過來參考下,希望對(duì)大家有所幫助2013-11-11
php及codeigniter使用session-cookie的方法(詳解)
下面小編就為大家?guī)硪黄猵hp及codeigniter使用session-cookie的方法(詳解)。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2017-04-04
php簡(jiǎn)單隔行變色功能實(shí)現(xiàn)代碼
這篇文章主要介紹了php簡(jiǎn)單隔行變色功能實(shí)現(xiàn)代碼,通過for語句讀取奇偶行數(shù)設(shè)置樣式的不同顏色值進(jìn)而實(shí)現(xiàn)隔行變色功能,需要的朋友可以參考下2016-07-07
PHP實(shí)現(xiàn)的簡(jiǎn)單在線計(jì)算器功能示例
這篇文章主要介紹了PHP實(shí)現(xiàn)的簡(jiǎn)單在線計(jì)算器功能,涉及php數(shù)值運(yùn)算與表單操作相關(guān)技巧,需要的朋友可以參考下2017-08-08
thinkphp多表查詢兩表有重復(fù)相同字段的完美解決方法
下面小編就為大家?guī)硪黄猼hinkphp多表查詢兩表有重復(fù)相同字段的完美解決方法。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2016-09-09
學(xué)習(xí)php設(shè)計(jì)模式 php實(shí)現(xiàn)命令模式(command)
這篇文章主要介紹了php設(shè)計(jì)模式中的命令模式,使用php實(shí)現(xiàn)命令模式,感興趣的小伙伴們可以參考一下2015-12-12

