query('SHOW CREATE TABLE edu_learning_histories')->fetch(PDO::FETCH_ASSOC); echo ($row['Create Table'] ?? 'N/A') . "\n\n"; echo "--- INDEXES ---\n"; $stmt = $pdo->query('SHOW INDEX FROM edu_learning_histories'); foreach ($stmt as $r) { echo ($r['Key_name'] ?? ''), "\t", ($r['Seq_in_index'] ?? ''), "\t", ($r['Column_name'] ?? ''), "\t", ((int)($r['Non_unique'] ?? 1) === 0 ? 'UNIQUE' : 'NON_UNIQUE'), "\n"; }