38960-vm/check_schema_billing.php
2026-03-21 07:38:35 +00:00

17 lines
456 B
PHP

<?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";
}
}