Skip to content

Commit

Permalink
smonitor: fix group by select fields
Browse files Browse the repository at this point in the history
(cherry picked from commit f2cd3cf)
  • Loading branch information
razvancrainea committed Jul 24, 2024
1 parent 56007f6 commit 1045cd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/tools/system/smonitor/lib/functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ function get_stats_list($box_id) {
$data_no=count($resultset);

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

0 comments on commit 1045cd6

Please sign in to comment.