19 lines
517 B
PHP
19 lines
517 B
PHP
<?php
|
|
require_once __DIR__ . '/config.php';
|
|
|
|
try {
|
|
$pdo = db();
|
|
|
|
$stmt = $pdo->query("SHOW CREATE TABLE users");
|
|
$user_table_def = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
echo "Users table definition:\n";
|
|
print_r($user_table_def);
|
|
|
|
$stmt = $pdo->query("SHOW CREATE TABLE lessons");
|
|
$lesson_table_def = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
echo "\nLessons table definition:\n";
|
|
print_r($lesson_table_def);
|
|
|
|
} catch (PDOException $e) {
|
|
die("Database query failed: " . $e->getMessage());
|
|
} |