mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 02:46:46 -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
|
@ -22,4 +22,23 @@ class Contributor{
|
|||
$instance->NacoafUrl = $nacoafUrl;
|
||||
return $instance;
|
||||
}
|
||||
|
||||
public function Create(): void{
|
||||
Db::Query('
|
||||
INSERT into Contributors (EbookId, Name, UrlName, SortName, WikipediaUrl, MarcRole, FullName,
|
||||
NacoafUrl, SortOrder)
|
||||
values (?,
|
||||
?,
|
||||
?,
|
||||
?,
|
||||
?,
|
||||
?,
|
||||
?,
|
||||
?,
|
||||
?)
|
||||
', [$this->EbookId, $this->Name, $this->UrlName, $this->SortName, $this->WikipediaUrl, $this->MarcRole, $this->FullName,
|
||||
$this->NacoafUrl, $this->SortOrder]);
|
||||
|
||||
$this->ContributorId = Db::GetLastInsertedId();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue