I am trying to convert
/* SELECT COUNT(id), YEAR(published_at), MONTH(published_at) FROM october.radiantweb_blog_posts Where published = 1 GROUP BY YEAR(published_at), MONTH(published_at) */
To php (and not getting very far)
so far I have:
$this['archiveDateOfPosts'] = Db::table('radiantweb_blog_posts')
->select('id')
->select('YEAR(published_at)')
->select('MONTH(published_at)')
->where('published', '=', 1)
->count();
looking for a pointer on how to convert it!
Last updated