More DB connection cleanup

This commit is contained in:
Alex Cabal 2024-04-28 20:53:05 -05:00
parent be329ea7c6
commit 233f8eb171

View file

@ -62,15 +62,13 @@ class DbConnection{
return []; return [];
} }
$this->QueryCount++;
$result = []; $result = [];
$preparedSql = $sql;
try{ try{
$handle = $this->_link->prepare($preparedSql); $handle = $this->_link->prepare($sql);
} }
catch(\PDOException $ex){ catch(\PDOException $ex){
throw $this->CreateDetailedException($ex, $preparedSql, $params); throw $this->CreateDetailedException($ex, $sql, $params);
} }
$name = 0; $name = 0;
@ -121,11 +119,13 @@ class DbConnection{
} }
else{ else{
$done = true; $done = true;
throw $this->CreateDetailedException($ex, $preparedSql, $params); throw $this->CreateDetailedException($ex, $sql, $params);
} }
} }
} }
$this->QueryCount++;
return $result; return $result;
} }