Test pages * 2/?

This commit is contained in:
Vincent
2024-06-04 23:30:04 +02:00
parent f0260ba791
commit a302916138
3 changed files with 8 additions and 2 deletions

View File

@@ -127,8 +127,8 @@ class Model_music extends CI_Model {
// Get artist info
$this->db->select('artist.name as artistName, artist.id, genre.name as genreName, artist.jpeg');
$this->db->from('artist');
$this->db->join('album', 'album.artistid = artist.id');
$this->db->join('genre', 'genre.id = album.genreid', 'left');
$this->db->join('album', 'album.artistid = artist.id', 'left');
$this->db->join('genre', 'album.genreid = genre.id', 'left');
$this->db->where('artist.id', $artistId);
$artistQuery = $this->db->get();
$artistDetails = $artistQuery->row();
@@ -143,6 +143,7 @@ class Model_music extends CI_Model {
return array('artist' => $artistDetails, 'albums' => $albums);
}
public function getSongDetails($songId) {
// Get song details
$this->db->select('song.name as songName, track.id as trackId, album.name as albumName, album.year, artist.name as artistName, genre.name as genreName, cover.jpeg');