-
Notifications
You must be signed in to change notification settings - Fork 0
/
Album.php
42 lines (37 loc) · 868 Bytes
/
Album.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
class album{
private $conn;
private $id;
private $title;
private $artistId;
private $genre;
public function __construct($conn,$id)
{
$this->conn=$conn;
$this->id=$id;
$query=mysqli_query($this->con,"SELECT * FROM song_info where id='$this->id'");
$album = mysqli_fetch_array($query);
$this->title= $album['song_name'];
$this->genre = $album['genre'];
$this->profile_pic = $album['profile_pic'];
}
public function getTitle()
{
return $this->song_name;
}
public function getArtistPic()
{
$query = mysqli_query($conn, "SELECT profile_pic from song_info where id='$this->id'");
$album = mysqli_fetch_array($query);
return $album['profile_pic'];
}
public function getArtistId()
{
return new Artist($this->conn,$this->artistId);
}
public function getGenre()
{
return $this->genre;
}
}
?>