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

$student_id = 6279;

$stmt = $pdo->query("SELECT ss.*, s.name as subject_name FROM student_subjects ss JOIN subjects s ON ss.subject_id = s.id WHERE ss.student_id = $student_id");
$student_subjects = $stmt->fetchAll(PDO::FETCH_ASSOC);

echo "Student 6279 subjects:\n";
foreach($student_subjects as $ss) {
    echo "- {$ss['subject_name']}: " . ($ss['is_fourth_subject'] ? '4th subject' : 'regular subject') . "\n";
}
?>
