mirror of
https://github.com/standardebooks/web.git
synced 2025-07-13 18:11:52 -04:00
Add Authors index
This commit is contained in:
parent
0e92b3acc8
commit
93b55d2da2
7 changed files with 37 additions and 11 deletions
|
@ -44,23 +44,27 @@ class Contributor{
|
|||
/**
|
||||
* @return array<Contributor>
|
||||
*/
|
||||
public static function GetAllAuthorNames(): array{
|
||||
public static function GetAllByMarcRole(Enums\MarcRole $marcRole): array{
|
||||
return Db::Query('
|
||||
SELECT DISTINCT Name
|
||||
SELECT
|
||||
*
|
||||
from Contributors
|
||||
where MarcRole = "aut"
|
||||
order by Name asc', [], Contributor::class);
|
||||
where MarcRole = ?
|
||||
and SortName is not null
|
||||
group by SortName
|
||||
order by SortName asc', [$marcRole], Contributor::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<Contributor>
|
||||
* @return array<stdClass>
|
||||
*/
|
||||
public static function GetAllTranslatorNames(): array{
|
||||
public static function GetAllNamesByMarcRole(Enums\MarcRole $marcRole): array{
|
||||
return Db::Query('
|
||||
SELECT DISTINCT Name
|
||||
SELECT
|
||||
distinct Name
|
||||
from Contributors
|
||||
where MarcRole = "trl"
|
||||
order by Name asc', [], Contributor::class);
|
||||
where MarcRole = ?
|
||||
order by Name asc', [$marcRole]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue