<?php
include 'config.php';

echo "Sales table structure:\n";
$result = $conn->query('DESCRIBE sales');
while ($row = $result->fetch_assoc()) {
    echo $row['Field'] . " - " . $row['Type'] . "\n";
}

echo "\nSample sales record:\n";
$result = $conn->query('SELECT * FROM sales LIMIT 1');
if ($row = $result->fetch_assoc()) {
    foreach ($row as $key => $value) {
        echo "$key: $value\n";
    }
} else {
    echo "No sales records found\n";
}
?>
