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

@@ -72,7 +72,7 @@
$strScript="";
$strSQL="SELECT l.id as lid,l.*,adr.* FROM location l LEFT JOIN address adr ON l.id=adr.loc_id ORDER BY city,postcode,suburb,hamlet,road ASC";
$result = $db->query($strSQL);
while ($row = $result->fetchArray()) {
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$id = $row['lid'];
$numDatum= strtotime($row['created_at']);
$strDatum= date("d.m.Y",$numDatum);
@@ -86,7 +86,7 @@
echo "<td>";
$strSQL = "SELECT id,username,comment,created_at FROM comment WHERE loc_id=".$id;
$comments = $db->query($strSQL);
while ($comment = $comments->fetchArray()) {
while ($comment = $comments->fetch(PDO::FETCH_ASSOC)) {
echo "<div class='comment'>";
echo "<em>".$comment['username']." schrieb am ";
$numDatum = strtotime($comment['created_at']);
@@ -102,7 +102,7 @@
echo "<td>";
$strSQL = "SELECT id,filename FROM files WHERE loc_id=".$id;
$files=$db->query($strSQL);
if ($file=$files->fetchArray()) {
if ($file=$files->fetch(PDO::FETCH_ASSOC)) {
echo "<img src='../images/".$file['filename']."' style='width:200px'>";
}
echo "</td>";