mirror of
https://github.com/standardebooks/web.git
synced 2025-07-18 20:36:38 -04:00
Initial code changes to insert/update Ebook records
This commit is contained in:
parent
073f138c47
commit
63d411a2e6
10 changed files with 531 additions and 28 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue