-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_users.php
More file actions
28 lines (24 loc) · 1.02 KB
/
check_users.php
File metadata and controls
28 lines (24 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
try {
$dsn = "pgsql:host=localhost;port=5432;dbname=fivem_dashboard";
$pdo = new PDO($dsn, 'postgres', '');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// Check if staff_accounts table exists and get its structure
$stmt = $pdo->query("SELECT column_name, data_type FROM information_schema.columns WHERE table_name = 'staff_accounts' AND table_schema = 'public' ORDER BY ordinal_position");
$columns = $stmt->fetchAll(PDO::FETCH_ASSOC);
if (empty($columns)) {
echo "staff_accounts table does not exist!\n";
} else {
echo "staff_accounts table structure:\n";
foreach ($columns as $column) {
echo "- {$column['column_name']}: {$column['data_type']}\n";
}
}
// Check for any data
$stmt = $pdo->query("SELECT COUNT(*) as count FROM staff_accounts");
$count = $stmt->fetch(PDO::FETCH_ASSOC);
echo "\nRecords in staff_accounts: {$count['count']}\n";
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}
?>