No images found. 😔
query("SELECT * FROM continents ORDER BY ContinentName"); $countries = $db->query("SELECT * FROM countries ORDER BY CountryName;"); $where = []; $params = []; if (!empty($_GET["continent"])) { $where[] = "ContinentCode=?"; $params[] = $_GET["continent"]; } if (!empty($_GET["country"])) { $where[] = "i.CountryCodeISO=?"; $params[] = $_GET["country"]; } if (!empty($_GET["title"])) { $where[] = "Title LIKE ? COLLATE NOCASE"; $params[] = "%{$_GET["title"]}%"; } $whereClause = empty($where) ? "" : " WHERE " . implode(" AND ", $where); $stmt = $db->prepare($imageSelectSql . $whereClause . " ORDER BY ImageID"); foreach ($params as $i => $param) { $stmt->bindValue($i + 1, $param); } $result = $stmt->execute(); $images = []; while ($row = $result->fetchArray()) $images[] = $row; ?>
No images found. 😔