PDO
This commit is contained in:
@@ -107,7 +107,7 @@
|
||||
$strSQL="SELECT loc.*,f.filename FROM location loc LEFT JOIN files f ON loc.id=f.loc_id ORDER BY created_at DESC";
|
||||
$result = $db->query($strSQL);
|
||||
$numCounter=1;
|
||||
while ($row = $result->fetchArray()) {
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$numDatum= strtotime($row['created_at']);
|
||||
$id=$row['id'];
|
||||
$datum= date("d.m.Y",$numDatum);
|
||||
@@ -126,7 +126,7 @@
|
||||
echo "<td>";
|
||||
$strSQL = "SELECT 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']);
|
||||
|
||||
Reference in New Issue
Block a user