mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 23:42:11 +00:00
add another field to group by, because it shall be selected
This commit is contained in:
parent
823e57c4c2
commit
c34ea0ed02
|
@ -2140,7 +2140,7 @@ class SeedDMS_Core_DMS {
|
|||
function getStatisticalData($type='') { /* {{{ */
|
||||
switch($type) {
|
||||
case 'docsperuser':
|
||||
$queryStr = "select b.`fullName` as `key`, count(`owner`) as total from `tblDocuments` a left join `tblUsers` b on a.`owner`=b.`id` group by `owner`";
|
||||
$queryStr = "select b.`fullName` as `key`, count(`owner`) as total from `tblDocuments` a left join `tblUsers` b on a.`owner`=b.`id` group by `owner`, b.`fullName`";
|
||||
$resArr = $this->db->getResultArray($queryStr);
|
||||
if (!$resArr)
|
||||
return false;
|
||||
|
@ -2154,7 +2154,7 @@ class SeedDMS_Core_DMS {
|
|||
|
||||
return $resArr;
|
||||
case 'docspercategory':
|
||||
$queryStr = "select b.`name` as `key`, count(a.`categoryID`) as total from `tblDocumentCategory` a left join `tblCategory` b on a.`categoryID`=b.id group by a.`categoryID`";
|
||||
$queryStr = "select b.`name` as `key`, count(a.`categoryID`) as total from `tblDocumentCategory` a left join `tblCategory` b on a.`categoryID`=b.id group by a.`categoryID`, b.`name`";
|
||||
$resArr = $this->db->getResultArray($queryStr);
|
||||
if (!$resArr)
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user