Contributor, EbookSource, GitCommit: Move INSERT statements to Create() methods

This commit is contained in:
Mike Colagrosso 2024-10-03 22:46:53 -06:00 committed by Alex Cabal
parent 4aefe412f9
commit 2378320d0c
4 changed files with 45 additions and 37 deletions

View file

@ -11,4 +11,15 @@ class EbookSource{
$instance->Url = $url;
return $instance;
}
public function Create(): void{
Db::Query('
INSERT into EbookSources (EbookId, Type, Url)
values (?,
?,
?)
', [$this->EbookId, $this->Type, $this->Url]);
$this->EbookSourceId = Db::GetLastInsertedId();
}
}