Skip to content
Snippets Groups Projects
Commit a480aaa1 authored by Onyxcodeotto's avatar Onyxcodeotto
Browse files

feat: Get all song from specific user

parent 593ffe38
No related merge requests found
......@@ -48,6 +48,14 @@ class SongModel
return $song;
}
public function getAllFromUser($userId){
$query = 'SELECT * FROM song WHERE user_id = :user_id';
$this->database->query($query);
$this->database->bind(':user_id', $userId);
$song = $this->database->fetchAll();
return $song;
}
public function addSong($judul, $penyanyi, $year, $audio, $image, $album_id) {
session_start();
if ($album_id == "undef") {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment