chanson d'un album
This commit is contained in:
@@ -28,13 +28,14 @@ class Model_music extends CI_Model {
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
public function getSongOfAlbum(){
|
||||
$query = $this->db->query(
|
||||
"SELECT artist.id, artist.name
|
||||
FROM artist
|
||||
Group by artist.id
|
||||
"
|
||||
);
|
||||
return $query->result();
|
||||
public function getSongOfAlbum($album_id){
|
||||
$query = $this->db->query(
|
||||
"SELECT song.id, song.name
|
||||
FROM song
|
||||
INNER JOIN track ON song.id = track.songId
|
||||
WHERE track.albumId = ?",
|
||||
array($album_id)
|
||||
);
|
||||
return $query->result();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user