asp语句问题,大家帮忙看一下

来源:百度知道 编辑:UC知道 时间:2024/05/27 08:29:37
一下这个是一个人才网的招聘代码,显示时一个单位每发布一条信息,就会有一个企业名称和一个职位信息。请求修改成:只显示一个单位,下面有多条信息。

<%
Set Rs = server.createobject("ADODB.Recordset")

TodayDate = Qsite.FormatDate(Date())

strIsLockId = IsLockId("Company")
Sql = "select top 45 * from RecruitTbl where ValidityDate > '"& TodayDate &"' and IsPause = '0' and ComId not in ("& strIsLockId &") order by EditDate,ViewQuantity desc"
Rs.Open Sql , Conn , 1 , 1
If rs.eof and rs.bof then
response.write "<p align='center'><font color='#ff0000'>还没任何资讯</font></p>"
else
%>

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" class="fontblack">
<tr><td height="8" colspan="2"></td></tr>
<%i=1 %>
<tr

strIsLockId = IsLockId("Company")
Sql = "select top 1 * from RecruitTbl where ValidityDate > '"& TodayDate &"' and IsPause = '0' and ComId not in ("& strIsLockId &") order by EditDate,ViewQuantity desc"
Rs.Open Sql , Conn , 1 , 1

这里改成都市 top 1 只有一条了