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

try {
    // Check sample data from subject_mark_distribution
    $stmt = $pdo->query('SELECT * FROM subject_mark_distribution LIMIT 5');
    $data = $stmt->fetchAll();
    
    echo "Sample data from subject_mark_distribution:\n";
    foreach ($data as $row) {
        echo "Subject ID: " . $row['subject_id'] . ", Class ID: " . $row['class_id'] . ", Session: " . $row['session'] . ", Exam Type: " . $row['exam_type'] . ", Total Marks: " . $row['total_marks'] . ", Pass Marks: " . $row['overall_pass_marks'] . "\n";
    }
    
    echo "\n";
    
    // Check sample data from mark_distributions
    $stmt = $pdo->query('SELECT * FROM mark_distributions LIMIT 5');
    $data = $stmt->fetchAll();
    
    echo "Sample data from mark_distributions:\n";
    foreach ($data as $row) {
        echo "Subject ID: " . $row['subject_id'] . ", Class ID: " . $row['class_id'] . ", Session: " . $row['session'] . ", Exam Type: " . $row['exam_type'] . ", Total Marks: " . $row['total_marks'] . ", Pass Marks: " . $row['pass_marks'] . "\n";
    }
    
} catch (PDOException $e) {
    echo "Error: " . $e->getMessage() . "\n";
}
?>