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

try {
    $pdo = getDB();

    echo "=== Estructura de la tabla usuarios ===\n";
    $stmt = $pdo->query('DESCRIBE usuarios');
    while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
        echo $row['Field'] . " - " . $row['Type'] . " - " . $row['Key'] . "\n";
    }

    echo "\n=== Usuarios existentes ===\n";
    $stmt = $pdo->query('SELECT * FROM usuarios');
    while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
        print_r($row);
    }

} catch (PDOException $e) {
    echo "Error: " . $e->getMessage() . "\n";
}
?>
