From 467994fed36bb977280034318b30cf374fbc8cd4 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 2 Sep 2016 12:02:47 +0000 Subject: [PATCH] Fixed small issue with User Group Hourly report. git-svn-id: svn://192.168.202.10@2585 3d104415-ff17-0410-8863-d5cf3c621b8a --- www/vicidial/AST_user_group_hourly_detail.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/vicidial/AST_user_group_hourly_detail.php b/www/vicidial/AST_user_group_hourly_detail.php index 8a635032..be9eb2af 100644 --- a/www/vicidial/AST_user_group_hourly_detail.php +++ b/www/vicidial/AST_user_group_hourly_detail.php @@ -490,7 +490,8 @@ if ($SUBMIT && $query_date && $start_hour && $end_hour) { $ASCII_text .= _QXZ("User groups").": ".implode(', ', $user_group)."\n"; $ASCII_text .= _QXZ("Campaigns").": ".implode(', ', $group)."\n\n"; - $stmt="select user_group, substr(event_time, 12,2) as hour, count(distinct user) as ct from ".$vicidial_agent_log_table." where event_time>='$query_date $start_hour:00:00' and event_time<='$query_date $end_hour:59:59' $group_SQL $user_group_SQL group by user_group, hour order by user_group, hour"; + $stmt="select user_group, substr(event_time, 12,2) as hour, count(distinct user) as ct from ".$vicidial_agent_log_table." where event_time>='$query_date $start_hour:00:00' and event_time<='$query_date $end_hour:59:59' $group_SQL $user_group_SQL group by user_group, hour order by hour, user_group"; + if ($DB) {$ASCII_text.=$stmt."\n";} $rslt=mysql_to_mysqli($stmt, $link); # select user_group, substr(event_time, 12,2) as hour, count(distinct user) as ct from ".$vicidial_agent_log_table." where ((event_time>='$query_date $start_hour:00:00' and event_time<='$query_date $end_hour:59:59') or (event_time+INTERVAL (pause_sec+wait_sec+talk_sec+dispo_sec) SECOND>='$query_date $start_hour:00:00' and event_time+INTERVAL (pause_sec+wait_sec+talk_sec+dispo_sec) SECOND<='$query_date $end_hour:59:59')) $group_SQL $user_group_SQL group by user_group, hour order by user_group, hour