Added a function to mark all qsos not sent to clublog

markallnotsent is really only needed if theres been a major failure
This commit is contained in:
Peter Goodhall
2019-06-20 15:53:57 +01:00
parent 4816240d9b
commit e351185bf1
2 changed files with 15 additions and 0 deletions

View File

@@ -106,6 +106,11 @@ class Clublog extends CI_Controller {
$this->load->model('clublog_model');
$this->clublog_model->mark_qsos_sent();
}
function markallnotsent() {
$this->load->model('clublog_model');
$this->clublog_model->mark_all_qsos_notsent();
}
}

View File

@@ -25,6 +25,16 @@ class Clublog_model extends CI_Model {
$this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "N");
$this->db->update($this->config->item('table_name'), $data);
}
function mark_all_qsos_notsent() {
$data = array(
'COL_CLUBLOG_QSO_UPLOAD_DATE' => null,
'COL_CLUBLOG_QSO_UPLOAD_STATUS' => "N",
);
$this->db->where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "Y");
$this->db->update($this->config->item('table_name'), $data);
}
}
?>