From 2d65d0f9dfe7ad79c465885fa8aec120df574226 Mon Sep 17 00:00:00 2001 From: Sejin Kim <54730100+kim3-sudo@users.noreply.github.com> Date: Tue, 20 Dec 2022 10:26:39 -0500 Subject: [PATCH] Add sort for services for group then service --- classes/constellation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/constellation.php b/classes/constellation.php index f7ab8d0..3dba616 100644 --- a/classes/constellation.php +++ b/classes/constellation.php @@ -73,7 +73,7 @@ class Constellation global $mysqli; //$query = $mysqli->query("SELECT id, name, description FROM services"); - $query = $mysqli->query("SELECT services.id, services.name, services.description, services_groups.name as group_name FROM services LEFT JOIN services_groups ON services.group_id=services_groups.id ORDER BY services_groups.name "); + $query = $mysqli->query("SELECT services.id, services.name, services.description, services_groups.name as group_name FROM services LEFT JOIN services_groups ON services.group_id=services_groups.id ORDER BY services_groups.name ASC, services.name;"); $array = array(); if ($query->num_rows){ $timestamp = time();