<?php
require_once 'config/database.php';

try {
    // Check exam subjects dates
    $stmt = $pdo->prepare('SELECT DISTINCT exam_date FROM exam_subjects WHERE exam_id = 68 AND exam_date IS NOT NULL ORDER BY exam_date');
    $stmt->execute();
    $exam_dates = $stmt->fetchAll(PDO::FETCH_COLUMN);
    echo "Exam subject dates for exam_id 68:\n";
    print_r($exam_dates);
    
    echo "\n";
    
    // Check manual room allocations dates
    $stmt = $pdo->prepare('SELECT DISTINCT exam_date FROM manual_room_allocations WHERE exam_id = 68 ORDER BY exam_date');
    $stmt->execute();
    $allocation_dates = $stmt->fetchAll(PDO::FETCH_COLUMN);
    echo "Manual room allocation dates for exam_id 68:\n";
    print_r($allocation_dates);
    
} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}
?>