$stmt = $pdo->query("SELECT * FROM Sessions ORDER BY LoginAt DESC");
$sessions = $stmt->fetchAll(PDO::FETCH_ASSOC);

echo "<h2>Sisäänkirjautumiset (Sessions-taulu)</h2>";
echo "<table border='1'><tr><th>id</th><th>IPv4</th><th>LoginAt</th><th>users_id</th></tr>";
foreach ($sessions as $row) {
    echo "<tr>
            <td>{$row['id']}</td>
            <td>{$row['IPv4']}</td>
            <td>{$row['LoginAt']}</td>
            <td>{$row['users_id']}</td>
          </tr>";
}
echo "</table>";
?>