Querying for BP-Follow stats
-
I’m looking to add some metrics on Follows to a dashboard widget I’m writing for our Buddypress site.
As far as ‘Follows’ (“Favorites”, in our case) goes, I’m looking to keep tabs on the following:
1. Total follows
2. Mutual follow
3. New follows over increments of time.1. This is easy,
$follows_total = count($wpdb->get_results( 'SELECT * FROM wp_bp_follow', OBJECT ));
2. Not sure if there’s a SQL-selection way to count instances where there is a relationship between leader_id and follow_id between two rows in the database, or if the only way is to do the comparison in php after querying for all of the rows? Any suggestions?
3. There’s no timestamp on follows.. so I’m either looking at adding structure to the database or saving my daily totals in another table and just comparing rows in that new table. Any suggestions?
Also, r-a-y, trying to contact you about some contract work via your form. Not sure if it’s working or actively checked? Don’t know how else to reach ya.
Thanks!
- The topic ‘Querying for BP-Follow stats’ is closed to new replies.