prepare(" INSERT INTO categories (user_id, category_type, name, sort_order, is_active) VALUES (?, ?, ?, ?, 1) "); $stmt->execute([$uid, $type, $name, $sort]); redirect('/categories.php'); } catch (Throwable $e) { $error = $e->getMessage(); } } $stmt = $pdo->prepare(" SELECT * FROM categories WHERE user_id = ? ORDER BY category_type, sort_order, id "); $stmt->execute([$uid]); $list = $stmt->fetchAll(); require __DIR__ . '/../app/views/header.php'; ?>
| ID | 유형 | 이름 | 정렬 | 활성 |
|---|---|---|---|---|
| = $row['id'] ?> | = h($row['category_type']) ?> | = h($row['name']) ?> | = $row['sort_order'] ?> | = $row['is_active'] ? 'Y' : 'N' ?> |