お知らせ

投稿 14

昨日のレシピPV順

SELECT A.postid, A.pageviews, A.view_date, B.post_type, B.post_title
FROM `wp_popularpostssummary` A, `wp_posts` B
WHERE A.view_date = “2017-06-10”
AND A.pageviews > 0
AND A.postid = B.ID
AND B.post_type = “gfl_recipe”
ORDER BY `A`.`pageviews` DESC

※ wp_popularpostssummary には PV=0 はセットされないので A.pageviews > 0 がなくても結果は同じ。

こちらの記事もおすすめ