<?php
$db = new PDO('sqlite:climate.db');
$stmt = $db->query("SELECT f.id, l.name as location, v.name as variable, p.range as period, f.image_climate_stripe_url FROM future_climate f JOIN locations l ON f.location_id = l.id JOIN variables v ON f.variable_id = v.id JOIN periods p ON f.period_id = p.id WHERE f.image_climate_stripe_url != ''");
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
print_r($rows);
