PDO
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user