<?php
$_SERVER['HTTP_HOST'] = 'localhost';
require 'backend/config/Database.php';
$db = new Database();
$conn = $db->getConnection();

echo "Users Table:\n";
$res = $conn->query("DESCRIBE users;");
while ($row = $res->fetch_assoc()) {
    echo $row['Field'] . " ";
}

echo "\n\nCustomers Table:\n";
$res = $conn->query("DESCRIBE customers;");
while ($row = $res->fetch_assoc()) {
    echo $row['Field'] . " ";
}

echo "\n\nSuppliers Table:\n";
$res = $conn->query("DESCRIBE suppliers;");
while ($row = $res->fetch_assoc()) {
    echo $row['Field'] . " ";
}

echo "\n\nPromotions Table:\n";
$res = $conn->query("DESCRIBE promotions;");
while ($row = $res->fetch_assoc()) {
    echo $row['Field'] . " ";
}
echo "\n";
?>
