mysql - How to get a list of followers and following from database -


im ok databases structure stumps me bit. it's michael hartls tutorialenter image description here

i trying json file list followers , people following in json format ['nodes'] consists of user names , ['links'] consist of id of firstly following , follower

the problem have no idea how execute query on table consists of both follower , follwing result when both same table.

join once on followingid , once on followerid , treat 2 "tables" in set. can join tona single table as want.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -