Implement category tree via AJAX to avoid 500 errors on page load

This commit is contained in:
2025-11-12 08:47:52 +01:00
parent 953f831ab9
commit deb27490c2
5 changed files with 78 additions and 1 deletions

15
test_db.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
require 'vendor/autoload.php';
require 'config.php';
$db = App\Database\Database::getInstance();
try {
$stmt = $db->query('SELECT COUNT(*) FROM categories');
$count = $stmt->fetchColumn();
echo "Categories: $count\n";
$stmt = $db->query('SELECT COUNT(*) FROM items');
$count = $stmt->fetchColumn();
echo "Items: $count\n";
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}
?>