mirror of
https://github.com/standardebooks/web.git
synced 2025-07-09 16:20:27 -04:00
Contributor, EbookSource, GitCommit: Move INSERT statements to Create() methods
This commit is contained in:
parent
4aefe412f9
commit
2378320d0c
4 changed files with 45 additions and 37 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue