From 8a6b1ea54e7ccd2cdd063123932030a0112adabc Mon Sep 17 00:00:00 2001 From: cp6 Date: Sun, 24 Jan 2021 13:33:45 +1100 Subject: [PATCH] Fixed last return id for new provider and location insert Fixed last return id for new provider and location insert --- class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class.php b/class.php index af6fdba..04a8077 100644 --- a/class.php +++ b/class.php @@ -1819,7 +1819,7 @@ class idlers extends helperFunctions } else {//NO $insert = $this->dbConnect()->prepare('INSERT INTO `locations` (`name`) VALUES (?);'); $insert->execute([$provider]); - return $db->lastInsertId(); + return $this->dbConnect()->lastInsertId(); } } @@ -1833,7 +1833,7 @@ class idlers extends helperFunctions } else {//NO $insert = $this->dbConnect()->prepare('INSERT INTO `providers` (`name`) VALUES (?);'); $insert->execute([$provider]); - return $db->lastInsertId(); + return $this->dbConnect()->lastInsertId(); } }