I'm trying to display the total number of friends on a user page - if anyone has this working or has any idea how to implement a count function into Pligg 9, them please let me know!
Thanks,
bergs
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| |
| |||
|
Figured this out! I just created a function that counts the number of friends a user has: function count_friends(){ global $db, $user; $friends = "SELECT count(*) FROM " . table_friends . " INNER JOIN " . table_users . " ON " . table_friends . ".friend_from = " . table_users . ".user_id WHERE (((" . table_friends . ".friend_to)= " . $user->id . ")) ;"; $count=$db->get_var($friends); echo $count; } |
| The Following User Says Thank You to bergs For This Useful Post: | ||
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sidebar Friends Module with messaging and activity | AnAlienHolakres3 | Modification Tutorials | 31 | 02-09-2008 06:54 AM |
| total number for upcoming stories | jacksdon2323 | General Help | 4 | 06-10-2007 01:22 AM |
| Suggestion for friends view | dollars5 | Suggestions | 0 | 04-10-2007 12:52 PM |
| Total Number Of Stories | smcgw | General Help | 0 | 04-08-2007 01:13 PM |
| Number of top stories allowed | ngrad | General Help | 5 | 07-07-2006 10:52 PM |




Linear Mode

