抽血感染艾滋病的新闻:谁能具体解释下这段

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/29 03:46:52
if kind="hot" then
if typeid="" then
sql="select top " & n & " * from news where audit=1 order by hits DESC"
else
sql="select top " & n & " * from news where typeid=" & cstr(typeid) & " and audit=1 order by hits DESC"
end if

在kind="hot"时 ,如果typeid="" ,那么sql="select top " & n & " * from news where audit=1 order by hits DESC" ,否则sql="select top " & n & " * from news where typeid=" & cstr(typeid) & " and audit=1 order by hits DESC" 。

其中:
sql="select top " & n & " * from news where audit=1 order by hits DESC"
表示从表news中查询符合条件audit=1的所有记录并按hits字段值降序排列后的前n条;

sql="select top " & n & " * from news where typeid=" & cstr(typeid) & " and audit=1 order by hits DESC"
表示从表news中查询符合条件typeid=cstr(typeid)且audit=1的所有记录并按hits字段值降序排列后的前n条。