"; $dir = "ASC"; break; case "prev": $clause = "<"; $dir = "DESC"; break; } } $sql = "SELECT * FROM photos WHERE photo_id " . $clause . " '" . $db->real_escape_string($photoID) . "' ORDER BY photo_id " . ($dir != "" ? $dir : "ASC") . " LIMIT 2"; $result= $db->query($sql); $stop = false; if ($result->num_rows == 1) { $stop = true; } $row = $result->fetch_assoc(); $photoID = $row["photo_id"]; ?> A Tribute To Paddy Cash | Tribute Page
"; ?>