mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 14:50:39 -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
|
@ -23,4 +23,16 @@ class GitCommit{
|
|||
$instance->Hash = $hash;
|
||||
return $instance;
|
||||
}
|
||||
|
||||
public function Create(): void{
|
||||
Db::Query('
|
||||
INSERT into GitCommits (EbookId, Created, Message, Hash)
|
||||
values (?,
|
||||
?,
|
||||
?,
|
||||
?)
|
||||
', [$this->EbookId, $this->Created, $this->Message, $this->Hash]);
|
||||
|
||||
$this->GitCommitId = Db::GetLastInsertedId();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue