fix group by clause to be be compliant with mysql 5.7
This commit is contained in:
committed by
FliegenKLATSCH
parent
9799e05ce4
commit
97d035eee9
@@ -730,7 +730,7 @@ if ($page == 'overview') {
|
|||||||
AND `dip`.`id_ipandports`
|
AND `dip`.`id_ipandports`
|
||||||
IN (SELECT `id_ipandports` FROM `".TABLE_DOMAINTOIP."`
|
IN (SELECT `id_ipandports` FROM `".TABLE_DOMAINTOIP."`
|
||||||
WHERE `id_domain` = :id)
|
WHERE `id_domain` = :id)
|
||||||
GROUP BY `d`.`domain`
|
GROUP BY `d`.`id`, `d`.`domain`
|
||||||
ORDER BY `d`.`domain` ASC"
|
ORDER BY `d`.`domain` ASC"
|
||||||
);
|
);
|
||||||
Database::pexecute($domains_stmt, array("id" => $result['id'], "customerid" => $userinfo['customerid']));
|
Database::pexecute($domains_stmt, array("id" => $result['id'], "customerid" => $userinfo['customerid']));
|
||||||
|
|||||||
@@ -115,8 +115,7 @@ if (!is_null($month) && !is_null($year)) {
|
|||||||
$result_stmt = Database::prepare("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
$result_stmt = Database::prepare("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
||||||
FROM `" . TABLE_PANEL_TRAFFIC . "`
|
FROM `" . TABLE_PANEL_TRAFFIC . "`
|
||||||
WHERE `customerid` = :customerid
|
WHERE `customerid` = :customerid
|
||||||
GROUP BY CONCAT(`year`,`month`)
|
GROUP BY `year` DESC, `month` DESC
|
||||||
ORDER BY CONCAT(`year`,`month`) DESC
|
|
||||||
LIMIT 12"
|
LIMIT 12"
|
||||||
);
|
);
|
||||||
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid']));
|
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid']));
|
||||||
|
|||||||
Reference in New Issue
Block a user