fetch all records from tblVersion

if not, the database will be locked when e.g. droping a table
This commit is contained in:
Uwe Steinmann 2018-04-05 11:58:25 +02:00
parent 88e4c0f3b9
commit 1652d9a237

View File

@ -61,7 +61,9 @@ if (!$db) {
$errorMsg = '';
$res = $db->query('select * from tblVersion');
if($rec = $res->fetch(PDO::FETCH_ASSOC)) {
$recs = $res->fetchAll(PDO::FETCH_ASSOC);
if(!empty($recs)) {
$rec = $recs[0];
if($_GET['version'] > $rec['major'].'.'.$rec['minor'].'.'.$rec['subminor']) {
if(file_exists('update-'.$_GET['version'].'/'.$sqlfile)) {