Skip to content

Commit f2cd3cf

Browse files
committed
smonitor: fix group by select fields
1 parent 78ebc0d commit f2cd3cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: web/tools/system/smonitor/lib/functions.inc.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ function get_stats_list($box_id) {
451451
$data_no=count($resultset);
452452

453453
require(__DIR__."/db_connect.php");
454-
$sql = "SELECT name, time FROM ocp_monitoring_stats WHERE name = ? AND box_id = ? group by name order by time asc";
454+
$sql = "SELECT name, max(time) as time FROM ocp_monitoring_stats WHERE name = ? AND box_id = ? group by name order by time asc";
455455
$stm = $link->prepare($sql);
456456
for($j=0;count($resultset)>$j;$j++)
457457
{

0 commit comments

Comments
 (0)