所以我有一张table叫 follow_sys
有三列 id
以及 follower
以及 following
包含关注者和followed的用户名,所以我想获取我关注的所有关注者,但他们不跟踪我,我怎么做?
我尝试了一个自我连接,但没有工作,我很困惑
$sqlFollowing = "SELECT * from follows_syds t1
join follows_syds t2 on
t1.follower != t2.following
where
t1.follower = ?
group by t1.id";
$Following = $conn -> prepare($sqlFollowing);
$Following -> bind_param('s',$getUser);
$Following -> execute();
$FollowingGET = $Following -> get_result();
$FollowingRows = $FollowingGET -> num_rows;
while($b = $FollowingGET -> fetch_assoc()){
print_r($b);
echo "</br>";
}
暂无答案!
目前还没有任何答案,快来回答吧!