wp-posts-to-posts icon indicating copy to clipboard operation
wp-posts-to-posts copied to clipboard

Sorting by number of connections?

Open funkatron82 opened this issue 12 years ago • 2 comments

Example to how this would be useful:

I'm using a p2p connection to connect a post type called movie with user, so people can favorite their favorite movie by basically connecting to it. I'd like to find a way of sorting movies based on how many faves (ie how many users are connected to it) they have; in other words, by popularity. If I can figure out a good mySQL algorithm I'll post it up.

Related to this, which file holds the mySQL creating?

funkatron82 avatar Apr 17 '13 04:04 funkatron82

Related to this, which file holds the mySQL creating?

That would be core/query.php. Also see https://github.com/scribu/wp-posts-to-posts/wiki/Class-diagrams

scribu avatar Apr 17 '13 09:04 scribu

Hello @funkedgeek, I know it's been a while, but did you get it working?

fl0ri avatar May 04 '18 11:05 fl0ri