Copy CodeThe code is as follows:
Select From_unixtime (pubtime, '%y-%m ') as Pubtime, COUNT (*) as CNT from articles Group by from_unixtime (Pubtime, '%y-%m ')
PHP Articles by date (day) SQL archive
Copy CodeThe code is as follows:
Select From_unixtime (pubtime, '%y-%m-%d ') as Pubtime, COUNT (*) as CNT from articles Group by from_unixtime (Pubtime, '%y-%m -%d ')
Non-timestamp date format archive (Date_format formatted date)
Copy CodeThe code is as follows:
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 month%d day ') as Shijian,count (*) as CNT from W p_posts where ' post_status ' = ' publish ' GROUP by Date_format (' post_date ', '%y%m%d ') The order by ' ID ' desc limit 0,7
http://www.bkjia.com/PHPjc/326264.html www.bkjia.com true http://www.bkjia.com/PHPjc/326264.html techarticle Copy the code as follows: Select From_unixtime (pubtime, '%y-%m ') as Pubtime, COUNT (*) as CNT from articles Group by From_unixtime (pub Time, '%y-%m ') PHP article by Date (day) SQL ...