mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +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;
|
||||
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);
|
||||
if (!$resArr)
|
||||
return false;
|
||||
|
||||
return $resArr;
|
||||
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);
|
||||
if (!$resArr)
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user