mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-12 01:54:57 +00:00
fix sql statements in getStatisticalData()
makes them work for sqlite and mysql
This commit is contained in:
parent
e807628eda
commit
1687ba233f
|
@ -2073,14 +2073,14 @@ class SeedDMS_Core_DMS {
|
||||||
|
|
||||||
return $resArr;
|
return $resArr;
|
||||||
case 'docspermonth':
|
case 'docspermonth':
|
||||||
$queryStr = "select `key`, count(`key`) as total from (select ".$this->db->getDateExtract("date")." as `key` from tblDocuments) a group by `key` order by `key`";
|
$queryStr = "select *, count(`key`) as total from (select ".$this->db->getDateExtract("date", '%Y-%m')." as `key` from tblDocuments) a group by `key` order by `key`";
|
||||||
$resArr = $this->db->getResultArray($queryStr);
|
$resArr = $this->db->getResultArray($queryStr);
|
||||||
if (!$resArr)
|
if (!$resArr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return $resArr;
|
return $resArr;
|
||||||
case 'docsaccumulated':
|
case 'docsaccumulated':
|
||||||
$queryStr = "select `key`, count(`key`) as total from (select ".$this->db->getDateExtract("date")." as `key` from tblDocuments) a group by `key` order by `key`";
|
$queryStr = "select *, count(`key`) as total from (select ".$this->db->getDateExtract("date")." as `key` from tblDocuments) a group by `key` order by `key`";
|
||||||
$resArr = $this->db->getResultArray($queryStr);
|
$resArr = $this->db->getResultArray($queryStr);
|
||||||
if (!$resArr)
|
if (!$resArr)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user