admin 7
This commit is contained in:
23
scratch_db_check.php
Normal file
23
scratch_db_check.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
require_once 'connect.php';
|
||||
|
||||
echo "--- ADMIN TABLE ---\n";
|
||||
try {
|
||||
$stmt = $con->prepare("SELECT id, name, role FROM admin");
|
||||
$stmt->execute();
|
||||
$admins = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
print_r($admins);
|
||||
} catch (Exception $e) {
|
||||
echo "Error: " . $e->getMessage() . "\n";
|
||||
}
|
||||
|
||||
echo "\n--- DATABASES ---\n";
|
||||
try {
|
||||
$stmt = $con->prepare("SHOW DATABASES");
|
||||
$stmt->execute();
|
||||
$dbs = $stmt->fetchAll(PDO::FETCH_COLUMN);
|
||||
print_r($dbs);
|
||||
} catch (Exception $e) {
|
||||
echo "Error: " . $e->getMessage() . "\n";
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user