From: Alexandre Alapetite Date: Sat, 15 Apr 2017 21:42:10 +0000 (+0200) Subject: ANY_VALUE in mod/admin X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8b3f623d29e7228115441d4824e2893a1585fe15;p=friendica.git ANY_VALUE in mod/admin The query was not standard, not deterministic, and was not doing what its description says. The patch makes it more standard and a bit more deterministic. The returned protocol type is still undeterministic. --- diff --git a/mod/admin.php b/mod/admin.php index 2652b33c12..093f7c8012 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -290,7 +290,8 @@ function admin_page_federation(App $a) { foreach ($platforms as $p) { // get a total count for the platform, the name and version of the // highest version and the protocol tpe - $c = qu('SELECT COUNT(*) AS `total`, `platform`, `network`, `version` FROM `gserver` + $c = qu('SELECT COUNT(*) AS `total`, ANY_VALUE(`platform`), + ANY_VALUE(`network`), MAX(`version`) FROM `gserver` WHERE `platform` LIKE "%s" AND `last_contact` >= `last_failure` ORDER BY `version` ASC;', $p); $total = $total + $c[0]['total'];