This commit is contained in:
Walter Hupfeld
2024-02-17 08:42:54 +01:00
parent 0df6729f8b
commit 91a8c4e567
14 changed files with 42 additions and 59 deletions

View File

@@ -1,6 +1,7 @@
<?php
$dbFilename="../db/locations.db";
require_once("../config.db.php");
require_once("../config.php");
require_once("../lib/functions.php");
require_once("../lib/geocoding.php");
@@ -55,7 +56,7 @@ $stmt->execute();
// fetch last_id - sqlite
$strSQL="SELECT id FROM location ORDER BY id DESC limit 1";
$result = $db->query($strSQL);
if ($row = $result->fetchArray()) {
if ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$id = $row['id'];
}
@@ -79,7 +80,7 @@ if ($boolUploadOk) {
// Retrun Markertext of entry
$strSQL="SELECT loc.*,f.filename FROM location loc LEFT JOIN files f ON loc.id=f.loc_id ORDER BY loc.id DESC limit 1";
$result = $db->query($strSQL);
if ($row = $result->fetchArray()) {
if ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$markerText=generate_tooltip_description($row);
$markerText=stripcslashes($markerText);
}