Update: 2026-05-04 00:13:56
This commit is contained in:
17
scripts/debug_data.php
Normal file
17
scripts/debug_data.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../app/bootstrap/init.php';
|
||||
use App\Core\Database;
|
||||
|
||||
$db = Database::getInstance();
|
||||
|
||||
echo "--- TENANTS ---\n";
|
||||
$stmt = $db->query("SELECT * FROM tenants");
|
||||
print_r($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||
|
||||
echo "\n--- USERS ---\n";
|
||||
$stmt = $db->query("SELECT u.id, u.name, u.role, u.tenant_id, t.name as tenant_name FROM users u LEFT JOIN tenants t ON u.tenant_id = t.id");
|
||||
print_r($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||
|
||||
echo "\n--- COMPANIES ---\n";
|
||||
$stmt = $db->query("SELECT * FROM companies");
|
||||
print_r($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||
Reference in New Issue
Block a user