Skip to content

Commit

Permalink
getLastInsID bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hbh112233abc committed Apr 12, 2024
1 parent 9783ba3 commit 5d7a624
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/connector/DM.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,7 @@ public function getLastInsID(BaseQuery $query, string $sequence = null)
{
$pdo = $this->linkID->query("SELECT SCOPE_IDENTITY()");
$insertId = $pdo->fetchColumn();
if ($insertId) {
$insertId = $this->autoInsIDType($query, $insertId);
return $insertId - 1;
}
$this->autoInsIDType($query, $insertId);
}

/**
Expand Down

0 comments on commit 5d7a624

Please sign in to comment.