mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
修正Oracle驱动
This commit is contained in:
@@ -51,7 +51,7 @@ class Oracle extends Connection
|
|||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @throws \think\Exception
|
* @throws \think\Exception
|
||||||
*/
|
*/
|
||||||
public function execute($sql, $bind = [], $fetch = false)
|
public function execute($sql, $bind = [], $fetch = false, $getLastInsID = false, $sequence = null)
|
||||||
{
|
{
|
||||||
$this->initConnect(true);
|
$this->initConnect(true);
|
||||||
if (!$this->linkID) {
|
if (!$this->linkID) {
|
||||||
@@ -85,6 +85,9 @@ class Oracle extends Connection
|
|||||||
$this->numRows = $this->PDOStatement->rowCount();
|
$this->numRows = $this->PDOStatement->rowCount();
|
||||||
if ($flag || preg_match("/^\s*(INSERT\s+INTO|REPLACE\s+INTO)\s+/i", $sql)) {
|
if ($flag || preg_match("/^\s*(INSERT\s+INTO|REPLACE\s+INTO)\s+/i", $sql)) {
|
||||||
$this->lastInsID = $this->linkID->lastInsertId();
|
$this->lastInsID = $this->linkID->lastInsertId();
|
||||||
|
if ($getLastInsID) {
|
||||||
|
return $this->lastInsID;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $this->numRows;
|
return $this->numRows;
|
||||||
} catch (\PDOException $e) {
|
} catch (\PDOException $e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user