36735-vm/db/category_seed.php
Flatlogic Bot d076708932 feat: Implement new design and features for the main page
- Redesigned the main page with a modern look and feel.
- Added search and filtering functionality for drills.
- Implemented pagination for browsing drills.
- Added the ability for users to mark drills as favorites.
2025-12-07 18:15:23 +00:00

29 lines
518 B
PHP

<?php
require_once __DIR__ . '/config.php';
$categories = [
'Fitness',
'Passing',
'Dribbling',
'Shooting',
'Defense',
'Goalkeeping',
'Set Pieces',
'Tactical'
];
try {
$pdo = db();
$stmt = $pdo->prepare("INSERT IGNORE INTO categories (name) VALUES (?)");
foreach ($categories as $category) {
$stmt->execute([$category]);
}
echo "Categories seeded successfully.\n";
} catch (PDOException $e) {
die("Error seeding categories: " . $e->getMessage());
}