14 lines
392 B
PHP
14 lines
392 B
PHP
<?php
|
|
require 'db/config.php';
|
|
foreach(['pos_transactions', 'invoices', 'pos_items', 'invoice_items'] 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";
|
|
}
|
|
}
|