Let's say I have the following table structure:
t1
-------------
id // row id
userID_follower // this user is a follows another member
userID_following // other member that this user
Is it possible to run a single query to combine both of the following:
how many users this person is following
select COUNT(id) from t1 WHERE userID_follower = ".$myID." ."
how many users follow this person
select COUNT(id) from t1 WHERE userID_following = ".$myID."
Thanks.
See Question&Answers more detail:os