Hello,

I would like to count the number of relationship requests and approved relationships for the history of my site.

Is this something possible at the moment?
Can someone please help in achieving this User Relationships counter?

Thank you so much!

Comments

mrf’s picture

You can get part way there, but unfortunately an all-time count isn't possible because once a pending request is cancelled, or an active relationship is cancelled it is deleted from the database;

SELECT count(*) from user_relationships WHERE approved = 0;
Will get you a tally for all the current pending relationships.

SELECT count(*) from user_relationships WHERE approved = 1;
Will get you a tally for all the current active relationships.

mrf’s picture

Status: Active » Fixed

Marking this one as fixed, feel free to re-open if you still have questions.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.