feat: add database dump, backup script, dashboard and address feature
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$pdo = new PDO('mysql:host=localhost;dbname=webgis_baru;charset=utf8', 'root', '');
|
||||
$tablesStmt = $pdo->query("SHOW TABLES");
|
||||
$tables = $tablesStmt->fetchAll(PDO::FETCH_COLUMN);
|
||||
|
||||
$schema = [];
|
||||
foreach ($tables as $table) {
|
||||
$stmt = $pdo->query("DESCRIBE $table");
|
||||
$schema[$table] = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
echo json_encode($schema, JSON_PRETTY_PRINT);
|
||||
Reference in New Issue
Block a user