<html><body> <? $id=@mssql_connect("ddy","sa"," ") or die("连接不上"); $db=mssql_select_db("ddy",$id); $query="select * from lr00 order by lr0012 desc"; $result=mssql_query($query); if($result): if($tt==""){ $nopa=0;} else $nopa=$tt; $gg=mssql_num_rows($result); echo $gg;