Handle zero in getCol()

This commit is contained in:
Eldar Yusupov
2019-10-26 20:18:46 +03:00
parent 203e210d3a
commit b54fca4f7e

View File

@@ -135,7 +135,7 @@ class DB
try { try {
$stmt = $this->getQueryStatement($sSQL, $aInputVars, $sErrMessage); $stmt = $this->getQueryStatement($sSQL, $aInputVars, $sErrMessage);
while ($val = $stmt->fetchColumn(0)) { // returns first column or false while (($val = $stmt->fetchColumn(0)) !== false) { // returns first column or false
$aVals[] = $val; $aVals[] = $val;
} }
} catch (\PDOException $e) { } catch (\PDOException $e) {