Is there a block with the profiles with the most followers?
Is there a block with the profiles with the most followers?
Otherwise someone could tell me the sql query to get the list with the most followers. I have currently created a block with the users with the most visits but I want the same with the followers.
This is the query I do so far: $sql = "SELECT * FROM `bx_persons_data` WHERE `picture` > 0 ORDER BY `views` DESC LIMIT 25";
-
-
-
-
·
LeonidS
- ·
You may use the query from the Analytics app (modules/boonex/analytics/classes/BxAnalyticsDb.php):
$sQuery = "SELECT `sys_profiles`.`content_id` AS `object_id`, `sys_profiles`.`type` , COUNT(`sys_profiles_conn_subscriptions`.`id`) AS `value` FROM `sys_profiles_conn_subscriptions`
INNER JOIN `sys_profiles` ON `sys_profiles`.`id` = `sys_profiles_conn_subscriptions`.`content` WHERE sys_profiles.type='" . $sModuleName . "' AND `sys_profiles_conn_subscriptions`.`added` >= :datefrom AND `sys_profiles_conn_subscriptions`.`added` <= :dateto GROUP BY `sys_profiles`.`content_id`, `sys_profiles`.`type` ORDER BY COUNT(`sys_profiles_conn_subscriptions`.`id`) DESC LIMIT 0," . intval(getParam('bx_analytics_items_count'));
-
·
LeonidS