<?php

class Musicbrainz_ArtistModel extends Model {
	
	public function getId($name) {
		$artist_info = $this->db->getRows($this->db->q('SELECT * FROM musicbrainz.bh_artist WHERE name = \''. $name .'\''));
		if ($artist_info) {
			$ids = array();
			foreach ($artist_info as $item) {
				if ($item['id'] == $artist_info[0]['id']) {
					$ids[] = $item['credit_id'];
				}
				return $ids;
			}
		} else {
			return false;
		}
	}
}