diff --git a/admin/dump.php b/admin/dump.php index abd582d..8da3289 100644 --- a/admin/dump.php +++ b/admin/dump.php @@ -30,7 +30,7 @@ $query = $db->query($strSQL); // Fetch the first row - $row = $query->fetchArray(SQLITE3_ASSOC); + $row = $query->fetch(PDO::FETCH_ASSOC); // If no results are found, echo a message and stop if ($row == false){ @@ -49,7 +49,7 @@ echo $line . "\n"; // Fetch the next line - $row = $query->fetchArray(SQLITE3_ASSOC); + $row = $query->fetch(PDO::FETCH_ASSOC); } // Prints the column names diff --git a/admin/index.php b/admin/index.php index 0bbf667..f186791 100644 --- a/admin/index.php +++ b/admin/index.php @@ -37,7 +37,7 @@ $stmt = $db->prepare("SELECT * FROM files where loc_id = :loc_id"); $stmt->bindValue(":loc_id", $numDelete, SQLITE3_TEXT); $result = $stmt->execute(); - if ($row = $result->fetchArray()) { + if ($row = $result->fetch(PDO::FETCH_ASSOC)) { $strFilename = $row['filename']; $strFilename = $uploaddir . $strFilename; unset($strFilename); @@ -67,7 +67,7 @@ $stmt = $db->prepare("SELECT * FROM files where id = :id"); $stmt->bindValue(":id", $numDelete, SQLITE3_TEXT); $result = $stmt->execute(); - if ($row=$result->fetchArray()) { + if ($row=$result->fetch(PDO::FETCH_ASSOC)) { $strFilename = $row['filename']; $strFilename = $uploaddir . $strFilename; unset($strFilename); @@ -181,7 +181,7 @@ //$strSQL="SELECT * FROM location ORDER BY created_at DESC"; $strSQL="SELECT l.id as lid,l.*,adr.* FROM location l LEFT JOIN address adr ON l.id=adr.loc_id ORDER BY created_at ASC"; $result = $db->query($strSQL); - while ($row = $result->fetchArray()) { + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { $id = $row['lid']; echo "