From 8cd08a6f08be4668aebab9aa14ad8689e3c2245e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Sep 2021 14:52:22 +0200 Subject: [PATCH] fix recreation of temp. table if requested table was just emptied by not removed --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index 5c0ade558..432fd5756 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -520,14 +520,14 @@ class SeedDMS_Core_DatabaseAccess { "GROUP BY `tblDocumentReviewLog`.`reviewID` "; //. // "ORDER BY `maxLogID`"; } - if (!$this->_ttreviewid) { + if (!$this->_ttreviewid) { if (!$this->getResult($queryStr)) return false; $this->_ttreviewid=true; } else { - if (is_bool($override) && $override) { - if (!$this->getResult("DELETE FROM `ttreviewid`")) + if (is_bool($override) && $override) { + if (!$this->getResult("DROP TABLE IF EXISTS `ttreviewid`")) return false; if (!$this->getResult($queryStr)) return false; @@ -568,7 +568,7 @@ class SeedDMS_Core_DatabaseAccess { } else { if (is_bool($override) && $override) { - if (!$this->getResult("DELETE FROM `ttapproveid`")) + if (!$this->getResult("DROP TABLE IF NOT EXISTS `ttapproveid`")) return false; if (!$this->getResult($queryStr)) return false; @@ -609,7 +609,7 @@ class SeedDMS_Core_DatabaseAccess { } else { if (is_bool($override) && $override) { - if (!$this->getResult("DELETE FROM `ttstatid`")) + if (!$this->getResult("DROP TABLE IF NOT EXISTS `ttstatid`")) return false; if (!$this->getResult($queryStr)) return false; @@ -650,7 +650,7 @@ class SeedDMS_Core_DatabaseAccess { } else { if (is_bool($override) && $override) { - if (!$this->getResult("DELETE FROM `ttcontentid`")) + if (!$this->getResult("DROP TABLE IF NOT EXISTS `ttcontentid`")) return false; if (!$this->getResult($queryStr)) return false;