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