diff --git a/_get_person_details.php b/_get_person_details.php index 026fa7b..dd9a0cd 100644 --- a/_get_person_details.php +++ b/_get_person_details.php @@ -11,7 +11,12 @@ if (isset($_GET['id'])) { $person = $stmt->fetch(PDO::FETCH_ASSOC); // Fetch all functions - $stmt = $pdo->query("SELECT id, name FROM functions ORDER BY display_order"); + $stmt = $pdo->query(" + SELECT f.id, f.name, bg.name as group_name + FROM functions f + LEFT JOIN bni_groups bg ON f.group_id = bg.id + ORDER BY f.display_order + "); $all_functions = $stmt->fetchAll(PDO::FETCH_ASSOC); // Fetch person's functions diff --git a/index.php b/index.php index 07323b7..cdc2ead 100644 --- a/index.php +++ b/index.php @@ -150,30 +150,35 @@ $bni_groups = $stmt_bni_groups->fetchAll(PDO::FETCH_ASSOC);