我如何让我跟踪的人,但他们不跟踪?

wtlkbnrh  于 2021-06-20  发布在  Mysql
关注(0)|答案(0)|浏览(209)

所以我有一张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>";
}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题