Merge branch 'master' of https://github.com/magicbug/Cloudlog
这个提交包含在:
当前提交
754098f986
共有 2 个文件被更改,包括 9 次插入 和 3 次删除
|
|
@ -11,7 +11,7 @@ class CQ extends CI_Model{
|
||||||
function get_zones(){
|
function get_zones(){
|
||||||
$data = $this->db->query(
|
$data = $this->db->query(
|
||||||
"select COL_CQZ, count(COL_CQZ)
|
"select COL_CQZ, count(COL_CQZ)
|
||||||
from TABLE_HRD_CONTACTS_V01
|
from ".$this->config->item('table_name')."
|
||||||
where COL_CQZ is not null
|
where COL_CQZ is not null
|
||||||
group by COL_CQZ order by COL_CQZ"
|
group by COL_CQZ order by COL_CQZ"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ class DXCC extends CI_Model {
|
||||||
function get_worked_bands() {
|
function get_worked_bands() {
|
||||||
// get all worked slots from database
|
// get all worked slots from database
|
||||||
$data = $this->db->query(
|
$data = $this->db->query(
|
||||||
"SELECT distinct LOWER(`COL_BAND`) as `COL_BAND` FROM `TABLE_HRD_CONTACTS_V01`"
|
"SELECT distinct LOWER(`COL_BAND`) as `COL_BAND` FROM `".$this->config->item('table_name')."`"
|
||||||
);
|
);
|
||||||
$worked_slots = array();
|
$worked_slots = array();
|
||||||
foreach($data->result() as $row){
|
foreach($data->result() as $row){
|
||||||
|
|
@ -54,7 +54,7 @@ class DXCC extends CI_Model {
|
||||||
|
|
||||||
$data = $this->db->query(
|
$data = $this->db->query(
|
||||||
"select COL_COUNTRY, COL_MODE, lcase(COL_BAND) as COL_BAND, count(COL_COUNTRY) as cnt
|
"select COL_COUNTRY, COL_MODE, lcase(COL_BAND) as COL_BAND, count(COL_COUNTRY) as cnt
|
||||||
from TABLE_HRD_CONTACTS_V01
|
from ".$this->config->item('table_name')."
|
||||||
group by COL_COUNTRY, COL_MODE, COL_BAND"
|
group by COL_COUNTRY, COL_MODE, COL_BAND"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -68,6 +68,12 @@ class DXCC extends CI_Model {
|
||||||
}
|
}
|
||||||
|
|
||||||
// update stats
|
// update stats
|
||||||
|
if (!isset($results[$row->COL_COUNTRY]))
|
||||||
|
$results[$row->COL_COUNTRY] = [];
|
||||||
|
|
||||||
|
if (!isset($results[$row->COL_COUNTRY][$row->COL_BAND]))
|
||||||
|
$results[$row->COL_COUNTRY][$row->COL_BAND] = 0;
|
||||||
|
|
||||||
$results[$row->COL_COUNTRY][$row->COL_BAND] += $row->cnt;
|
$results[$row->COL_COUNTRY][$row->COL_BAND] += $row->cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用