<?php
require_once 'db/config.php';
$db = db();

$tables = ['services', 'xray_inquiries', 'laboratory_inquiries', 'visit_prescriptions', 'bill_items'];

foreach ($tables as $table) {
    try {
        $stmt = $db->query("SHOW CREATE TABLE $table");
        $row = $stmt->fetch(PDO::FETCH_ASSOC);
        echo $row['Create Table'] . "\n\n";
    } catch (Exception $e) {
        echo "Table $table not found or error: " . $e->getMessage() . "\n\n";
    }
}

