prepare($sql); $stmt->execute(); $topCategory = $stmt->fetch(); } catch (Throwable $e) { $queryError = $e->getMessage(); } } ?>
Nhóm theo loại hàng GROUP BY c.id, c.name, tính tổng doanh thu SUM(oi.quantity * oi.price), sắp xếp giảm dần và lấy duy nhất 1 dòng đầu tiên bằng LIMIT 1.
= htmlspecialchars($sql) ?>
= htmlspecialchars($topCategory['description'] ?? '') ?>