Created
May 20, 2010 01:31
-
-
Save michaeltwofish/407081 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function get_years_array() | |
{ | |
$years = DB::get_column( | |
"SELECT DISTINCT habari__postinfo.value from habari__posts | |
INNER join habari__posttype on habari__posts.content_type = habari__posttype.id and habari__posttype.name = ? | |
left join habari__postinfo on habari__posts.id = habari__postinfo.`post_id` and `habari__postinfo`.name = ? | |
ORDER BY habari__postinfo.value DESC", | |
array('imprint', 'year') | |
); | |
return $years; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment