本帖最后由 ahkxhyl 于 2012-08-16 21:01:07 编辑

解决方案 »

  1.   

    select count(FID) from guanzhu where ...
    不知道表结构
      

  2.   

    SELECT count(ID) FROM `guanzhu` WHERE ID>(select  ID from guanzhu where FID='$uid');
      

  3.   

    [Err] 1242 - Subquery returns more than 1 row 
      

  4.   

    额,不唯一吗,再试试这句
    SELECT count(ID) FROM `guanzhu` WHERE ID>(select ID from guanzhu where FID='$uid' limit 0,1);
      

  5.   

    谢谢哥们了 您写的SQL查出来不是排名哦 我想要实现的是 个人用户查看自己在所有关注中排名是第多少名。