From 13a5168e233d591b0b6613d4a5a808e1d2cb0127 Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Sat, 21 Mar 2026 18:49:56 +0100 Subject: [PATCH] int vs blank vs db fix --- application/models/Logbookadvanced_model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php index cf6902a8c..d9d89ee40 100644 --- a/application/models/Logbookadvanced_model.php +++ b/application/models/Logbookadvanced_model.php @@ -1191,6 +1191,8 @@ class Logbookadvanced_model extends CI_Model { if ($value == '') return; + $value2 == '' ? null : $this->frequency->GetBand($value2); + $sql = "UPDATE ".$this->config->item('table_name')." JOIN station_profile ON ". $this->config->item('table_name').".station_id = station_profile.station_id" . " SET " . $this->config->item('table_name').".COL_FREQ = ?" . ", " . $this->config->item('table_name').".COL_FREQ_RX = ?" . @@ -1199,7 +1201,7 @@ class Logbookadvanced_model extends CI_Model { " WHERE " . $this->config->item('table_name').".col_primary_key in ? and station_profile.user_id = ?"; $band = $this->frequency->GetBand($value); - $bandRx = $value2 == '' ? null : $this->frequency->GetBand($value2); + $bandRx = $value2 == null ? null : $this->frequency->GetBand($value2); $query = $this->db->query($sql, array($value, $value2, $band, $bandRx, json_decode($ids, true), $this->session->userdata('user_id'))); } else if ($column == 'COL_GRIDSQUARE') {