From 1d33c5d938f68c39ad2834f42761fde4d798f12b Mon Sep 17 00:00:00 2001 From: int2001 Date: Tue, 17 Oct 2023 10:23:51 +0000 Subject: [PATCH] Maintable as var --- application/models/Logbookadvanced_model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php index c9cb793d..eb150267 100644 --- a/application/models/Logbookadvanced_model.php +++ b/application/models/Logbookadvanced_model.php @@ -9,8 +9,8 @@ class Logbookadvanced_model extends CI_Model { if ($searchCriteria['dupes'] !== '') { $id_sql="select group_concat(x.qsoids separator ',') as QSO_IDs from ( - select GROUP_CONCAT(col_primary_key separator ',') as qsoids, COL_CALL, COL_MODE, COL_SUBMODE, station_callsign, COL_SAT_NAME, COL_BAND, min(col_time_on) Mintime, max(col_time_on) Maxtime from - TABLE_HRD_CONTACTS_V01 join station_profile on TABLE_HRD_CONTACTS_V01.station_id = station_profile.station_id where station_profile.user_id=? + select GROUP_CONCAT(col_primary_key separator ',') as qsoids, COL_CALL, COL_MODE, COL_SUBMODE, station_callsign, COL_SAT_NAME, COL_BAND, min(col_time_on) Mintime, max(col_time_on) Maxtime from " . $this->config->item('table_name') . " + join station_profile on " . $this->config->item('table_name') . ".station_id = station_profile.station_id where station_profile.user_id=? group by col_call, col_mode, COL_SUBMODE, STATION_CALLSIGN, col_band, COL_SAT_NAME having count(*) > 1 and timediff(maxtime, mintime) < 3000) x"; $id_query = $this->db->query($id_sql, $searchCriteria['user_id']); foreach ($id_query->result() as $id) {