asp调用疑难

来源:百度知道 编辑:UC知道 时间:2024/05/20 13:55:02
公共文件
<%sub myhotel(classid)%>
<%
if classid=1 then
theclass=3
sql_top="select top 5 * from hotel where op_type like '%"&theclass&"%' order by hots asc,id desc "
end if
if classid=2 then
theclass=1
sql_top="select top 5 * from hotel where op_type like '%"&theclass&"%' and (star=1 or star=2) order by hots asc,id desc "
end if
if classid=3 then
theclass=1
sql_top="select top 5 * from hotel where op_type like '%"&theclass&"%' and (star=3 or star=4) order by hots asc,id desc "
end if
if classid=4 then
theclass=1
sql_top="select top 5 * from hotel where op_type like '%"&theclass&"%' and (star=5 or star=6) order by hots asc,id desc "
end if
set rs_top=Server.CreateObject("ADODB.Recordset")
rs_top.open sql_top,conn,

<%sub myhotel(classid)%>
<%
if classid=1 then
theclass=3
sql_top="select top 5 * from hotel where op_type like '%"&theclass&"%' order by hots asc,id desc "
end if
if classid=2 then
theclass=1
sql_top="select top 5 * from hotel where op_type like '%"&theclass&"%' and (star>=5) order by hots asc,id desc "
end if
if classid=3 then
theclass=1
sql_top="select top 5 * from hotel where op_type like '%"&theclass&"%' and (star=4) order by hots asc,id desc "
end if
if classid=4 then
theclass=1
sql_top="select top 5 * from hotel where op_type like '%"&theclass&"%' and (star=3) order by hots asc,id desc "
end if
set rs_top=Server.CreateObject("ADODB.Recordset")
rs_top.open sql_top,conn,1,1
if (rs_top.eof and rs_top.bof) then
respon