import Meteorschauers fertig
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
$config = require getcwd() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'database.php';
|
||||
$dsn = sprintf('mysql:host=%s;dbname=%s;charset=%s', $config['host'], $config['dbname'], $config['charset'] ?? 'utf8mb4');
|
||||
try {
|
||||
$pdo = new PDO($dsn, $config['user'], $config['pass'], [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
|
||||
echo "CONNECTED\n";
|
||||
$stmt = $pdo->query('SHOW TABLES LIKE "meteorshowers"');
|
||||
var_export($stmt->fetchColumn()); echo "\n";
|
||||
} catch (Throwable $e) {
|
||||
echo get_class($e) . ': ' . $e->getMessage() . "\n";
|
||||
}
|
||||
Reference in New Issue
Block a user