Beispiel #1
0
 public static function getDetailWhereGrouping($sqlWhere, $currentGroup, $detailFieldInfo)
 {
     $sqlWhere = empty($sqlWhere) ? " WHERE (1=1)" : $sqlWhere;
     switch ($detailFieldInfo['grouping']) {
         case "Detail":
             //************************************************//
             //*****Calculate Detail Extended Where Clause*****//
             //************************************************//
             $detailGroupWhereExtensionQuery = asol_ReportsGenerationFunctions::getDetailGroupWhereExtensionQuery($sqlWhere, $detailFieldInfo['field'], $currentGroup);
             $subGroup = $detailGroupWhereExtensionQuery["subGroup"];
             $sqlDetailWhere = $detailGroupWhereExtensionQuery["sqlDetailWhere"];
             break;
         case "Minute Detail":
         case "Quarter Hour Detail":
         case "Hour Detail":
         case "Day Detail":
         case "DoW Detail":
         case "WoY Detail":
         case "Month Detail":
         case "Natural Quarter Detail":
         case "Fiscal Quarter Detail":
         case "Natural Year Detail":
         case "Fiscal Year Detail":
             //**************************************************************//
             //***Calculate Month/DoW/WoY/Day Detail Extended Where Clause***//
             //**************************************************************//
             $monthDayDetailGroupWhereExtensionQuery = asol_ReportsGenerationFunctions::getDateDetailGroupWhereExtensionQuery($sqlWhere, $detailFieldInfo['field'], $detailFieldInfo['grouping'], $currentGroup);
             $subGroup = $monthDayDetailGroupWhereExtensionQuery["subGroup"];
             $sqlDetailWhere = $monthDayDetailGroupWhereExtensionQuery["sqlDetailWhere"];
             break;
     }
     return array('subGroup' => $subGroup, 'sqlDetailWhere' => $sqlDetailWhere);
 }