From 2e2dff391a442cf5ed1263f74ddfa446cbb41bff Mon Sep 17 00:00:00 2001 From: phl0 Date: Sat, 23 Nov 2024 12:57:26 +0100 Subject: [PATCH] Sort data results for graphing --- application/models/Stats.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/models/Stats.php b/application/models/Stats.php index d92d88b29..4511120bc 100644 --- a/application/models/Stats.php +++ b/application/models/Stats.php @@ -720,7 +720,8 @@ $sql = "SELECT count(*) qsos, round(COL_ANT_EL) elevation FROM ".$this->config->item('table_name')." where station_id in (" . implode(',',$logbooks_locations_array) . ") and coalesce(col_ant_el, '') <> '' $where - group by round(col_ant_el)"; + group by round(col_ant_el) + order by elevation asc"; $result = $this->db->query($sql, $binding); return $result->result(); @@ -771,7 +772,8 @@ where station_id in (" . implode(',',$logbooks_locations_array) . ") and coalesce(col_ant_az, '') <> '' $where - group by round(col_ant_az)"; + group by round(col_ant_az) + order by azimuth asc"; $result = $this->db->query($sql, $binding); return $result->result();