mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 02:46:46 -04:00
Use 'insert ... returning' instead of 'Db::GetLastInsertedId()'
This commit is contained in:
parent
4446b6d161
commit
5066252355
12 changed files with 44 additions and 57 deletions
|
@ -1777,7 +1777,7 @@ final class Ebook{
|
|||
throw $error;
|
||||
}
|
||||
|
||||
Db::Query('
|
||||
$this->EbookId = Db::QueryInt('
|
||||
INSERT into Ebooks (Identifier, WwwFilesystemPath, RepoFilesystemPath, KindleCoverUrl, EpubUrl,
|
||||
AdvancedEpubUrl, KepubUrl, Azw3Url, DistCoverUrl, Title, FullTitle, AlternateTitle,
|
||||
Description, LongDescription, Language, WordCount, ReadingEase, GitHubUrl, WikipediaUrl,
|
||||
|
@ -1808,6 +1808,7 @@ final class Ebook{
|
|||
?,
|
||||
?,
|
||||
?)
|
||||
returning EbookId
|
||||
', [$this->Identifier, $this->WwwFilesystemPath, $this->RepoFilesystemPath, $this->KindleCoverUrl, $this->EpubUrl,
|
||||
$this->AdvancedEpubUrl, $this->KepubUrl, $this->Azw3Url, $this->DistCoverUrl, $this->Title,
|
||||
$this->FullTitle, $this->AlternateTitle, $this->Description, $this->LongDescription,
|
||||
|
@ -1815,8 +1816,6 @@ final class Ebook{
|
|||
$this->EbookCreated, $this->EbookUpdated, $this->TextSinglePageByteCount, $this->IndexableText,
|
||||
$this->IndexableAuthors, $this->IndexableCollections]);
|
||||
|
||||
$this->EbookId = Db::GetLastInsertedId();
|
||||
|
||||
try{
|
||||
$this->AddTags();
|
||||
$this->AddLocSubjects();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue