/** **/ function getAlbum($id) { $result = array(); $sql = " SELECT SQL_NO_CACHE * FROM Album WHERE IDAlbum = :id "; $params = array(":id" => $id); $sth = $this->db->prepare($sql); $sth->execute($params); if ($sth->rowCount() == 1) { $response = $sth->fetch(PDO::FETCH_OBJ); $album = new album(); //----- $album->init($response->IDAlbum, $response->Title, $response->Cover, $response->Artist); $album->setTracks($this->getAlbumTracks($response->IDAlbum)); array_push($result, $album); } return $result; }