X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=communityhome%2Fcommunityhome.php;h=8a2f3d291f10c5204555cc85ed0f5052b5be2e77;hb=2ca92ed594ba3909fdcc063b2b63e27620841336;hp=cbcf86a018fc99ac04330b7d5d685050351c43af;hpb=33f67e95f649d1503e4a1ba3c6c037f17ed552d3;p=friendica-addons.git diff --git a/communityhome/communityhome.php b/communityhome/communityhome.php index cbcf86a0..8a2f3d29 100755 --- a/communityhome/communityhome.php +++ b/communityhome/communityhome.php @@ -75,8 +75,8 @@ function communityhome_home(&$a, &$o){ // this query don't work on some mysql versions if (get_config('communityhome','showactiveusers')===true){ $r = q("SELECT `uni`.`contacts`,`uni`.`items`, `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname` FROM - (SELECT COUNT(`id`) as `contacts`, `uid` FROM `contact` WHERE `self`=0 GROUP BY `uid`) AS `con`, - (SELECT COUNT(`id`) as `items`, `uid` FROM `item` WHERE `item`.`changed` > DATE(NOW() - INTERVAL 1 MONTH) AND `item`.`wall` = 1 GROUP BY `uid`) AS `ite`, + (SELECT COUNT(*) as `contacts`, `uid` FROM `contact` WHERE `self`=0 GROUP BY `uid`) AS `con`, + (SELECT COUNT(*) as `items`, `uid` FROM `item` WHERE `item`.`changed` > DATE(NOW() - INTERVAL 1 MONTH) AND `item`.`wall` = 1 GROUP BY `uid`) AS `ite`, ( SELECT `contacts`,`items`,`ite`.`uid` FROM `con` RIGHT OUTER JOIN `ite` ON `con`.`uid`=`ite`.`uid` UNION ALL