用select * from subject order by id desc就查不出ID为4980的这条记录
只有用 select * from subject where id=4980 才能查到ID为4980的这条记录
只有用 select * from subject where id=4980 才能查到ID为4980的这条记录
解决方案 »
- 求一个PHP小i机器人接口
- 任意二级域名的伪静态规则难题,请高手们帮忙
- 页面逐步提示
- 刚学,咋这么简单的判读我都搞不定?
- 求一条SQL语句(急)
- 一个正则想让高手讲讲
- Client does not support authentication protocol requested by server; consider upgrading MySQL client ,这是怎么回事呢?
- XP 下要怎么配置HPH服务器呀,急急急,在线等!!!
- 请教怎样使php页面跳转的时候不出现?id=xxx之类的?还有其他问题。
- 用PHP可不可以实现一个客户管理的管理程序
- 怎么才可以让媒体文件以另存为方式打开(100分)
- 高手请教!!!
$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/>";
}
?>
$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);
select * from subject id>4980 order by id desc