prepare("SELECT * FROM galerie WHERE id_galerii = :id LIMIT 1"); $stmt -> bindValue(":id", $id); $stmt -> execute(); $galeria = $stmt -> fetch(PDO::FETCH_ASSOC); if (!$galeria) { header("Location: galerie.php"); exit ; } $stmt = $pdo -> prepare("SELECT * FROM zdjecia WHERE id_galerii = :id ORDER BY id_zdjecia"); $stmt -> bindValue(":id", $id); $stmt -> execute(); $slider = ""; $thumbs = ""; $counter = 0; while ($zdjecie = $stmt -> fetch(PDO::FETCH_ASSOC)) { $slider .= << EOT; $thumbs .= << EOT; $counter++; } ?> Swissstandards.pl