24 lines
636 B
PHP
24 lines
636 B
PHP
<?php
|
|
require_once __DIR__ . '/db_conn.php';
|
|
$pdo = db_conn();
|
|
$tables = [
|
|
'edu_user_learning_goals',
|
|
'edu_learning_histories',
|
|
'edu_content_memos',
|
|
'edu_goal_contents',
|
|
'edu_learning_goals',
|
|
'edu_contents'
|
|
];
|
|
foreach ($tables as $t) {
|
|
echo '=== ' . $t . ' ===' . PHP_EOL;
|
|
$rows = $pdo->query('SHOW COLUMNS FROM ' . $t)->fetchAll(PDO::FETCH_ASSOC);
|
|
foreach ($rows as $r) {
|
|
$def = $r['Default'];
|
|
if ($def === null) {
|
|
$def = 'NULL';
|
|
}
|
|
echo $r['Field'] . '|' . $r['Type'] . '|' . $r['Null'] . '|' . $r['Key'] . '|' . $def . PHP_EOL;
|
|
}
|
|
echo PHP_EOL;
|
|
}
|