<?php
require_once __DIR__ . '/../config/database.php';
try {
    $stmt = $pdo->query("SELECT status, COUNT(*) as c FROM members GROUP BY status");
    $statuses = $stmt->fetchAll(PDO::FETCH_ASSOC);
    print_r($statuses);
    
    // Also check total count
    $total = $pdo->query("SELECT COUNT(*) FROM members")->fetchColumn();
    echo "Total members: $total\n";
    
    // Check 'Available' count specifically
    $avail = $pdo->query("SELECT COUNT(*) FROM members WHERE status='Available'")->fetchColumn();
    echo "Available members: $avail\n";
    
} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}
?>
