mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 18:42:00 -04:00
List artwork by artist via /artworks/<artist-name>
This commit is contained in:
parent
780be15ed0
commit
cad2f5f730
8 changed files with 63 additions and 12 deletions
|
@ -247,6 +247,20 @@ class Library{
|
|||
return $artworks;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<Artwork>
|
||||
*/
|
||||
public static function GetArtworkByArtist(string $artistUrlName): array{
|
||||
$artworks = Db::Query('
|
||||
SELECT art.*
|
||||
from Artworks art
|
||||
inner join Artists a using (ArtistId)
|
||||
where a.UrlName = ?
|
||||
order by art.Created desc', [$artistUrlName], 'Artwork');
|
||||
|
||||
return $artworks;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<mixed>
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue