15 lines
441 B
PHP
15 lines
441 B
PHP
<?php
|
|
require 'db/config.php';
|
|
$tables = ['invoices', 'invoice_items', 'pos_transactions', 'pos_items', 'payments', 'pos_payments'];
|
|
foreach ($tables as $t) {
|
|
echo "Table: $t\n";
|
|
try {
|
|
$res = db()->query("DESCRIBE $t");
|
|
while ($r = $res->fetch(PDO::FETCH_ASSOC)) {
|
|
echo " {$r['Field']} ({$r['Type']})\n";
|
|
}
|
|
} catch (Exception $e) {
|
|
echo " Error: " . $e->getMessage() . "\n";
|
|
}
|
|
}
|