Fix SQL JOIN in get_last_qsos for station_profile
Changed the SQL query in get_last_qsos to use LEFT JOIN for station_profile instead of JOIN. This ensures that QSOs are returned even if there is no matching station_profile, improving data completeness.
这个提交包含在:
父节点
3f8f81364b
当前提交
5c4c1c2cd5
共有 1 个文件被更改,包括 6 次插入 和 7 次删除
|
|
@ -1932,7 +1932,6 @@ class Logbook_model extends CI_Model
|
||||||
|
|
||||||
function get_last_qsos($num, $StationLocationsArray = null)
|
function get_last_qsos($num, $StationLocationsArray = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($StationLocationsArray == null) {
|
if ($StationLocationsArray == null) {
|
||||||
$CI = &get_instance();
|
$CI = &get_instance();
|
||||||
$CI->load->model('logbooks_model');
|
$CI->load->model('logbooks_model');
|
||||||
|
|
@ -1949,7 +1948,7 @@ class Logbook_model extends CI_Model
|
||||||
order by col_time_on desc, col_primary_key desc
|
order by col_time_on desc, col_primary_key desc
|
||||||
limit " . $num .
|
limit " . $num .
|
||||||
") hrd
|
") hrd
|
||||||
JOIN station_profile ON station_profile.station_id = hrd.station_id
|
LEFT JOIN station_profile ON station_profile.station_id = hrd.station_id
|
||||||
LEFT JOIN dxcc_entities ON hrd.col_dxcc = dxcc_entities.adif
|
LEFT JOIN dxcc_entities ON hrd.col_dxcc = dxcc_entities.adif
|
||||||
order by col_time_on desc, col_primary_key desc";
|
order by col_time_on desc, col_primary_key desc";
|
||||||
|
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用