mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
use primary key for QSO instead searching for it again
This commit is contained in:
@@ -410,8 +410,8 @@ class Qrz extends CI_Controller {
|
||||
$status = $this->logbook_model->import_check($time_on, $record['call'], $record['band'], $record['mode'], $record['station_callsign']);
|
||||
|
||||
if($status[0] == "Found") {
|
||||
$qrz_status = $this->logbook_model->qrz_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'],$record['station_callsign']);
|
||||
|
||||
$qrz_status = $this->logbook_model->qrz_update($status[1], $qsl_date, $record['qsl_rcvd']);
|
||||
// log_message('error', $record['call'].": ".$qrz_status);
|
||||
$table .= "<tr>";
|
||||
$table .= "<td>".$record['station_callsign']."</td>";
|
||||
$table .= "<td>".$time_on."</td>";
|
||||
|
||||
@@ -3251,17 +3251,14 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
|
||||
}
|
||||
}
|
||||
|
||||
function qrz_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $station_callsign) {
|
||||
function qrz_update($primarykey, $qsl_date, $qsl_status) {
|
||||
|
||||
$data = array(
|
||||
'COL_QRZCOM_QSO_DOWNLOAD_DATE' => $qsl_date,
|
||||
'COL_QRZCOM_QSO_DOWNLOAD_STATUS' => $qsl_status,
|
||||
);
|
||||
|
||||
$this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"');
|
||||
$this->db->where('COL_CALL', $callsign);
|
||||
$this->db->where('COL_BAND', $band);
|
||||
$this->db->where('COL_STATION_CALLSIGN', $station_callsign);
|
||||
$this->db->where('COL_PRIMARY_KEY', $primarykey);
|
||||
|
||||
if ($this->db->update($this->config->item('table_name'), $data)) {
|
||||
unset($data);
|
||||
|
||||
Reference in New Issue
Block a user