fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16568]


From: nelson . guerra
Subject: [Fmsystem-commits] [16568]
Date: Mon, 10 Apr 2017 12:34:34 -0400 (EDT)

Revision: 16568
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16568
Author:   nelson224
Date:     2017-04-10 12:34:34 -0400 (Mon, 10 Apr 2017)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind-2/property/inc/class.soreport.inc.php

Modified: branches/dev-syncromind-2/property/inc/class.soreport.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.soreport.inc.php       
2017-04-10 16:34:14 UTC (rev 16567)
+++ branches/dev-syncromind-2/property/inc/class.soreport.inc.php       
2017-04-10 16:34:34 UTC (rev 16568)
@@ -67,6 +67,7 @@
                        $sort = isset($data['sort']) && $data['sort'] ? 
$data['sort'] : 'DESC';
                        $order = isset($data['order']) ? $data['order'] : '';
                        $allrows = isset($data['allrows']) ? $data['allrows'] : 
'';
+                       $dataset_id = isset($data['dataset_id']) ? 
$data['dataset_id'] : '';
                        $results = isset($data['results']) && $data['results'] 
? (int)$data['results'] : 0;
                        
                        if ($order)
@@ -80,11 +81,11 @@
 
                        $where = 'WHERE';
 
-                       /*if ($dimb_id > 0)
+                       if ($dataset_id > 0)
                        {
-                               $filtermethod .= " $where 
fm_budget.ecodimb={$dimb_id}";
+                               $filtermethod .= " $where 
fm_view_dataset.id={$dataset_id}";
                                $where = 'AND';
-                       }*/
+                       }
 
                        if ($query)
                        {
@@ -206,12 +207,13 @@
                                $agregates[] = 
$jsonB['cbo_aggregate'][$v]."(".$v.") AS ".$jsonB['txt_aggregate'][$v];
                        }
                        $func_agregates = implode(',', $agregates);
+                       $order = '';
                        if (count($jsonB['order']))
                        {
-                               $order = implode(',', $jsonB['order']);
+                               $order = ' ORDER BY '.implode(',', 
$jsonB['order']);
                        }
                        
-                       $sql = "SELECT ".$columns.",".$func_agregates." FROM 
".$dataset['view_name']." GROUP BY ".$columns;
+                       $sql = "SELECT ".$columns.",".$func_agregates." FROM 
".$dataset['view_name']." GROUP BY ".$columns.$order;
                        
                        $this->db->query($sql, __LINE__, __FILE__);
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]