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

echo "Database connection successful\n";

// Check student groups
$stmt = $pdo->query('SELECT * FROM student_groups');
$groups = $stmt->fetchAll();
echo "Student groups: " . count($groups) . "\n";
print_r($groups);

// Check if there are students with groups
$stmt = $pdo->query("SELECT DISTINCT group_name FROM students WHERE group_name IS NOT NULL AND group_name != ''");
$studentGroups = $stmt->fetchAll();
echo "\nStudent groups in students table: " . count($studentGroups) . "\n";
print_r($studentGroups);
?>