1
0
Fork 0
oldhaven/php-bak/app/musicbrainz/models/ReleaseGroup.class.php

36 lines
667 B
PHP
Raw Normal View History

2011-03-31 02:01:16 +00:00
<?php
class Musicbrainz_ReleaseGroupModel extends Model {
public function getArtistAlbums($artist_ids) {
return $this->db->getRows(
$this->db->q('
SELECT *
FROM musicbrainz.bh_release_group
WHERE
artist_id IN (\''. implode('\',\'', $artist_ids) .'\') AND
2011-04-05 05:41:03 +00:00
release_type = 1
2011-03-31 02:01:16 +00:00
ORDER BY
year ASC,
id ASC
'),
'id'
);
}
public function getArtistAlbumsIds($artist_id) {
return array_keys($this->db->getRows(
$this->db->q('
SELECT id
FROM musicbrainz.bh_release_group
WHERE
artist_id = \''. $artist_id .'\' AND
2011-04-05 05:41:03 +00:00
release_type = 1
2011-03-31 02:01:16 +00:00
ORDER BY
year ASC,
id ASC
'),
'id'
));
}
}