query("SELECT * FROM quiz_attempts ORDER BY created_at DESC LIMIT 20"); $attempts = $stmt->fetchAll(); $total_attempts_stmt = $pdo->query("SELECT COUNT(*) as total FROM quiz_attempts"); $total_attempts = $total_attempts_stmt->fetch()['total']; $style_distribution_stmt = $pdo->query("SELECT primary_style, COUNT(*) as count FROM quiz_attempts GROUP BY primary_style"); $style_distribution = $style_distribution_stmt->fetchAll(PDO::FETCH_KEY_PAIR); $styles_info = [ 'v' => ['name' => 'Visual'], 'a' => ['name' => 'Auditory'], 'r' => ['name' => 'Read/Write'], 'k' => ['name' => 'Kinesthetic'], ]; ?>
| ID | Visual | Auditory | Read/Write | Kinesthetic | Primary Style | Date |
|---|---|---|---|---|---|---|