From a99e344e966c4e272a5b9992f8f5efce7f3c74be Mon Sep 17 00:00:00 2001 From: DJ3CE Date: Wed, 12 Mar 2025 00:51:09 +0100 Subject: [PATCH 1/2] Fix or-grouping conditions when (not) to update requested qsl --- application/models/Logbook_model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 98f2cc21f..e8b29341c 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1958,8 +1958,10 @@ class Logbook_model extends CI_Model { ); $this->db->where('COL_PRIMARY_KEY', $qso_id); + $this->db->or_group_start(); $this->db->where('COL_QSL_SENT !=','R'); $this->db->where('COL_QSL_SENT_VIA !=', $method); + $this->db->group_end(); $this->db->update($this->config->item('table_name'), $data); From 571370307a085d55e751d7be05a559e4be3f916d Mon Sep 17 00:00:00 2001 From: DJ3CE Date: Wed, 12 Mar 2025 16:38:49 +0100 Subject: [PATCH 2/2] Place that 'or' at the appropriate place - tnx @int2001 --- application/models/Logbook_model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index e8b29341c..ac43f2e31 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1958,9 +1958,9 @@ class Logbook_model extends CI_Model { ); $this->db->where('COL_PRIMARY_KEY', $qso_id); - $this->db->or_group_start(); + $this->db->group_start(); $this->db->where('COL_QSL_SENT !=','R'); - $this->db->where('COL_QSL_SENT_VIA !=', $method); + $this->db->or_where('COL_QSL_SENT_VIA !=', $method); $this->db->group_end(); $this->db->update($this->config->item('table_name'), $data);