From 7f75156d95abfd2edc5a889766be64a766314e96 Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Tue, 14 Oct 2025 14:14:55 +0200 Subject: [PATCH] Added sat name filter --- application/models/Wpx.php | 25 +++++++++++++++++++++++-- application/views/awards/wpx/index.php | 2 +- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/application/models/Wpx.php b/application/models/Wpx.php index 686a61a10..1027828f7 100644 --- a/application/models/Wpx.php +++ b/application/models/Wpx.php @@ -127,6 +127,13 @@ class WPX extends CI_Model { $sql .= $this->addOrbitToQuery($postdata, $bindings); + if ($band == 'SAT') { + if ($postdata['sat'] != 'All') { + $sql .= " and col_sat_name = ?"; + $bindings[] = $postdata['sat']; + } + } + $sql .= " ) AS s ) AS t ) as x"; @@ -231,6 +238,13 @@ class WPX extends CI_Model { $sql .= $this->addOrbitToQuery($postdata,$bindings); + if ($band == 'SAT') { + if ($postdata['sat'] != 'All') { + $sql .= " and col_sat_name = ?"; + $bindings[] = $postdata['sat']; + } + } + $sql .= " ) AS s ) AS t ) as x"; @@ -434,6 +448,13 @@ class WPX extends CI_Model { } $sql .= $this->addContinentsToQuery($postdata); + if ($band == 'SAT') { + if ($postdata['sat'] != 'All') { + $sql .= " and col_sat_name = ?"; + $bindings[] = $postdata['sat']; + } + } + $sql .= " ) AS s ) AS t ) as x @@ -497,9 +518,9 @@ class WPX extends CI_Model { $binding[]=$band; } else { if ($band == 'All' || $band == 'Total') { - $sql .= " and col_prop_mode !='SAT'"; + $sql .=" and (col_prop_mode!='SAT' or col_prop_mode is null)"; } else { - $sql .= " and col_prop_mode !='SAT'"; + $sql .=" and (col_prop_mode!='SAT' or col_prop_mode is null)"; $sql .= " and col_band = ?"; $binding[]=$band; } diff --git a/application/views/awards/wpx/index.php b/application/views/awards/wpx/index.php index 54111f4c1..de65487dc 100644 --- a/application/views/awards/wpx/index.php +++ b/application/views/awards/wpx/index.php @@ -10,8 +10,8 @@