Guest User

Untitled

a guest
May 26th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. $years = DB::get_column(
  2. "SELECT habari__postinfo.value, count(habari__posts.id) FROM habari__posts
  3. INNER JOIN habari__posttype ON habari__posts.content_type = habari__posttype.id AND habari__posttype.name = ?
  4. INNER JOIN habari__postinfo ON habari__posts.id = habari__postinfo.`post_id` AND `habari__postinfo`.name = ?
  5. INNER JOIN habari__poststatus ON habari__posts.status = habari__poststatus.id AND habari__poststatus.name = ?
  6. GROUP BY habari__postinfo.value
  7. ORDER BY habari__postinfo.value DESC",
  8. array('imprint', 'year', 'published')
  9. );
Add Comment
Please, Sign In to add comment