- SELECT COUNT(`uid`) as aa FROM `cdb_members` WHERE `extcredits2`+`extcredits3` > (SELECT `extcredits2`+`extcredits3` FROM `cdb_members` WHERE `username` = '$name')
- $sql03="SELECT COUNT(`uid`) as aa FROM `cdb_members` WHERE `extcredits2`+`extcredits3` > (SELECT `extcredits2`+`extcredits3` FROM `cdb_members` WHERE `username` = '$name')";
- $query03=mysql_query($sql03,$conn);
- $row03=mysql_fetch_array($query03);
- $ranking=$row[aa]+1;
记得加1