Initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
|
||||
// Test database connection
|
||||
$conn = new mysqli("localhost", "root", "", "webgis_unified");
|
||||
if ($conn->connect_error) {
|
||||
echo json_encode(['success' => false, 'error' => 'DB Connection: ' . $conn->connect_error]);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Test table structure
|
||||
$result = $conn->query("DESCRIBE data_unified");
|
||||
$columns = [];
|
||||
while($row = $result->fetch_assoc()) {
|
||||
$columns[] = $row['Field'];
|
||||
}
|
||||
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'database' => 'webgis_unified',
|
||||
'table' => 'data_unified',
|
||||
'columns' => $columns,
|
||||
'column_count' => count($columns)
|
||||
]);
|
||||
$conn->close();
|
||||
?>
|
||||
Reference in New Issue
Block a user