Initial code changes to insert/update Ebook records

This commit is contained in:
Mike Colagrosso 2024-04-20 23:21:48 -06:00 committed by Alex Cabal
parent 073f138c47
commit 63d411a2e6
10 changed files with 531 additions and 28 deletions

View file

@ -673,6 +673,24 @@ class Library{
}
}
public static function GetEbookByIdentifier(?string $identifier): ?Ebook{
if($identifier === null){
return null;
}
$result = Db::Query('
SELECT *
from Ebooks
where Identifier = ?
', [$identifier], 'Ebook');
if(sizeof($result) == 0){
return null;
}
return $result[0];
}
/**
* @throws Exceptions\AppException
*/