Added time of "Worked before" in Contest-Section
这个提交包含在:
父节点
2886ec5a4c
当前提交
70db88b521
共有 2 个文件被更改,包括 5 次插入 和 2 次删除
|
|
@ -189,7 +189,8 @@ class Contesting extends CI_Controller {
|
||||||
|
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
if ($result && $result->num_rows()) {
|
if ($result && $result->num_rows()) {
|
||||||
echo json_encode(array('message' => 'Worked before'));
|
$timeb4=$result->row()->b4;
|
||||||
|
echo json_encode(array('message' => 'Worked '.$timeb4.' before'));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -220,6 +220,7 @@ class Contesting_model extends CI_Model {
|
||||||
$date = DateTime::createFromFormat('d-m-Y H:i:s', $qsoarray[0]);
|
$date = DateTime::createFromFormat('d-m-Y H:i:s', $qsoarray[0]);
|
||||||
$date = $date->format('Y-m-d H:i:s');
|
$date = $date->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$this->db->select('timediff(UTC_TIMESTAMP(),col_time_on) b4');
|
||||||
$this->db->where('STATION_ID', $station_id);
|
$this->db->where('STATION_ID', $station_id);
|
||||||
$this->db->where('COL_CALL', xss_clean($call));
|
$this->db->where('COL_CALL', xss_clean($call));
|
||||||
$this->db->where("COL_BAND", xss_clean($band));
|
$this->db->where("COL_BAND", xss_clean($band));
|
||||||
|
|
@ -229,6 +230,7 @@ class Contesting_model extends CI_Model {
|
||||||
$this->db->where("COL_MODE", xss_clean($mode));
|
$this->db->where("COL_MODE", xss_clean($mode));
|
||||||
$this->db->or_where("COL_SUBMODE", xss_clean($mode));
|
$this->db->or_where("COL_SUBMODE", xss_clean($mode));
|
||||||
$this->db->group_end();
|
$this->db->group_end();
|
||||||
|
$this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "DESC");
|
||||||
$query = $this->db->get($this->config->item('table_name'));
|
$query = $this->db->get($this->config->item('table_name'));
|
||||||
|
|
||||||
return $query;
|
return $query;
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用