用select * from subject order by id desc就查不出ID为4980的这条记录
只有用 select * from subject where id=4980 才能查到ID为4980的这条记录

解决方案 »

  1.   

    ***********以下是我的代码***********include("CONNECTDATABASE.PHP");
    $sql="select * from subject ORDER BY ID DESC";
    $result=mysql_query($sql);
    while($row=mysql_fetch_row($result))
    {
    echo "ID:$row[0]";if($row[0]=="")echo"<font color=\"red\"><strong>空</strong></font>";echo"|BorderID:$row[1]";if($row[1]=="")echo"<font color=\"red\"><strong>空</strong></font>";echo"|PostUserID:$row[4]";if($row[4]=="")echo"<font color=\"red\"><strong>空</strong></font>";echo"|viewcount:$row[7]";if($row[7]=="")echo"<font color=\"red\"><strong>空</strong></font>";echo"|followcount:$row[8]";if($row[8]=="")echo"<font color=\"red\"><strong>空</strong></font>";echo"|password:$row[10]";if($row[10]=="")echo"<font color=\"red\"><strong>空</strong></font>";echo"|BorderID2:$row[11]";if($row[11]=="")echo"<font color=\"red\"><strong>空</strong></font>";echo"|Class:$row[13]";if($row[13]=="")echo"<font color=\"red\"><strong>空</strong></font>";echo"|Auditing:$row[14]";if($row[14]=="")echo"<font color=\"red\"><strong>空</strong></font>";echo"|level:$row[15]";if($row[15]=="")echo"<font color=\"red\"><strong>空</strong></font>";echo"|share:$row[16]";if($row[16]=="")echo"<font color=\"red\"><strong>空</strong></font>";echo"|<br/>";
    }
    ?>
      

  2.   

    看地霧殺殺
    $sql="select * from subject where 1<2 ORDER BY ID DESC";
    $result=mysql_query($sql);或者
    $sql="select * from subject where id>0 ORDER BY ID DESC";
    $result=mysql_query($sql);
      

  3.   

    twt326(天地小子) 说法有道理 最好检查一下按照你的select排序的 4980的前一条记录
      

  4.   

    尝试
    select * from subject id>4980 order by id desc