Show
Ignore:
Timestamp:
07/24/08 09:16:59 (4 months ago)
Author:
dduponchelle
Message:

CSV exporting solved for servicegroup.
(Ticket #79)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/centreon/www/include/reporting/dashboard/dataEngine/ServicesGroupLog.php

    r5226 r5864  
    3232        $end_date_select = 0; 
    3333 
    34  
    35         require_once('simple-func.php'); 
    36         require_once('reporting-func.php'); 
     34require_once($centreon_path."www/include/reporting/dashboard/common-Func.php"); 
     35require_once($centreon_path."www/include/reporting/dashboard/DB-Func.php"); 
    3736 
    3837        # 
     
    346345                        "avg( `CRITICALTimeScheduled` ) as 'CRITICALTimeScheduled', " . 
    347346                        "avg( `CRITICALnbEvent` ) as 'CRITICALnbEvent' " . 
    348                         "FROM `log_archive_service` WHERE `date_start` >= " . $sd . " AND `date_end` <= " . $ed . 
     347                        "FROM ".$conf_centreon['dbcstg'].".`log_archive_service` WHERE `date_start` >= " . $sd . " AND `date_end` <= " . $ed . 
    349348                        " AND `service_id` IN (" . 
    350                         "SELECT `service_service_id` FROM `servicegroup_relation` WHERE `servicegroup_sg_id` = '" . $servicegroup_id ."') group by date_end, date_start order by date_start desc"; 
     349                        "SELECT `service_service_id` FROM ".$conf_centreon['db'].".`servicegroup_relation` WHERE `servicegroup_sg_id` = '" . $servicegroup_id ."') group by date_end, date_start order by date_start desc"; 
    351350        $res = & $pearDB->query($rq); 
    352351        while ($h =& $res->fetchRow()) {