Added COL_HRDLOG_QSO_UPLOAD_STATUS != 'Y' to the Update-query

This commit is contained in:
int2001
2024-07-01 15:17:22 +00:00
parent 8b74a34117
commit 31dcf8de70

View File

@@ -107,7 +107,7 @@ class Hrdlog_model extends CI_Model {
foreach ($qsos->result() as $qso) {
$mark_them[]=$qso->COL_PRIMARY_KEY;
}
$sql="update ".$this->config->item('table_name')." set COL_HRDLOG_QSO_UPLOAD_DATE='".date("Y-m-d H:i:s", strtotime("now"))."', COL_HRDLOG_QSO_UPLOAD_STATUS='Y' where col_primary_key in (".implode(',', array_values($mark_them)).") and station_id=".$station_id;
$sql="update ".$this->config->item('table_name')." set COL_HRDLOG_QSO_UPLOAD_DATE='".date("Y-m-d H:i:s", strtotime("now"))."', COL_HRDLOG_QSO_UPLOAD_STATUS='Y' where COL_HRDLOG_QSO_UPLOAD_STATUS != 'Y' and col_primary_key in (".implode(',', array_values($mark_them)).") and station_id=".$station_id;
$query = $this->db->query($sql);
return $this->db->affected_rows();
}