Active
Project:
Buddylist
Version:
5.x-1.1-beta
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2008 at 23:00 UTC
Updated:
6 Oct 2008 at 23:55 UTC
I've been looking around the forums and found code to display a count of buddies a user has added to their buddylist...
$result = "SELECT DISTINCT(u.uid) as buddy, u.access FROM {buddylist} b INNER JOIN {users} u ON b.uid = u.uid WHERE b.buddy = %d ORDER BY u.access DESC";
print '<p class="column">Total number of fans: ' . $result->buddy . '</p>';
My problem is how can I change this to display the total number of users who have added me to their buddylist? Instead of showing who I added to my buddylist.
Thanks in advance for any help...
Comments
Comment #1
walker2238 commentedPlease ignore the above code as that is my lame attempt at getting it to show people who added me to their buddylist without even using COUNT haha dumb.... the code I am using to show who I added is as follows
Sorry...
Comment #2
walker2238 commentedWell I figured it out. So if anyone else is looking for this here is how you show the number of users who added you to their buddylist... to be displayed in the users profile... Nice module BTW very well documented.