急须帮忙~~!!!!

zigine 2003-04-28 01:47:14
<%
if ismoney=0 then
strBusi="select messageid,type,title,other,msgdate,content from business where type=3 or type=4 order by datevalue(msgdate) desc"

else
strBusi="select b.messageid,b.type,b.title,b.other,b.msgdate,b.content from business b,[user] u where b.userid=u.userid and datediff('d',u.regtimeout,now)<=0 and u.isreg=1 and b.type=3 or type=4 order by datevalue(b.msgdate) desc"

end if
set rsBusi=Server.CreateObject("Adodb.RecordSet")
rsBusi.open strBusi,Conn,3
rsBusi.Pagesize=Pagesize
%>
这样写没有错吧,那不知,为什么,我那会,显示重复的信息


这是代码:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="796" > <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>

<td width="577" valign="top"> <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5"> </td>
<td class="dongtai" valign="top">  
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="490" class="dongtai"> <table width="100%" border="0">
<tr>
<td background="../IMAGES/ddd.gif"><b><img src="../IMAGES/row.gif" width="8" height="11">招
聘 求 职 信 息 </b></td>
</tr>
</table>
<table width="100%" border="0">
<form name="Form_Page" action="index.asp" method="post" >
<% If Request.Form("Topage")= "" then
CurPage = 1
Else
CurPage = CLng(Request.Form("Topage"))
End If
If Not rsBusi.EOF Then '获取数据并显示
TotalPages = rsBusi.PageCount
TotalCount = rsBusi.RecordCount

If CurPage>rsBusi.PageCount then CurPage=TotalPages
rsBusi.AbsolutePage = CurPage
%>
<tr>
<th width='8%' align=center height=22> <span class="pt9">编号</span></th>
<th width='29%' align=center><span class="pt9">信息标题</span></th>
<th width='7%' align=center><span class="pt9">类型</span></th>
<th width='20%' align=center><span class="pt9">所在类别</span></th>
<th width='16%' align=center><span class="pt9">提交日期</span></th>
</tr>
<%
I=0
do while (not rsBusi.EOF) And (I<rsBusi.PageSize)
%>
<tr>
<td width=8% height="21" align="center"><span class="pt9"><%=I+1+Pagesize*(Curpage-1)%></span></td>
<td width='29%'><a href="bsdetail.asp?messageid=<%=rsBusi("messageid")%>" title="<%=left(rsBusi("content"),20)%>..." target="_blank"><span class="pt9"><font color=#000000><%=rsBusi("title")%></font></span></a></td>
<%If rsBusi("type")=3 then%>
<td width='7%' align=center><span class="pt9">招聘</span></td>
<%Else%>
<td width='20%' align=center><span class="pt9">求职</span></td>
<%End IF%>
<td width='16%' align=center><span class="pt9"><%=rsBusi("other")%></span></td>
<td width='20%' align=center><span class="pt9"><%=rsBusi("msgdate")%></span></td>
</tr>
<% rsBusi.MoveNext
I=I+1
if (not rsBusi.EOF) And (I<rsBusi.PageSize) then
%>
<tr>
<td width=8% align="center"><span class="pt9"><%=I+1+Pagesize*(Curpage-1)%></span></td>
<td width='29%'><a href="bsdetail.asp?messageid=<%=rsBusi("messageid")%>" title="<%=left(rsBusi("content"),20)%>..." target="_blank"><span class="pt9"><font color=#000000><%=rsBusi("title")%></font></span></a></td>
<%If rsBusi("type")=3 then%>
<td width='7%' align=center><span class="pt9">招聘</span></td>
<%Else%>
<td width='20%' align=center><span class="pt9">求职</span></td>
<%End IF%>
<td width='16%' align=center><span class="pt9"><%=rsBusi("other")%></span></td>
<td width='20%' align=center><span class="pt9"><%=rsBusi("msgdate")%></span></td>
</tr>
<% rsBusi.MoveNext
I=I+1
end if
Loop%>
<tr>
<td align=center colspan=5><span class="pt9">共<font color=red><b><%=TotalCount%></b></font>条招聘求职信息,<font color=red><b><%=CurPage%>/<%=TotalPages %></b></font>页  
<%If CurPage>1 Then %>
<a href="javascript:topage(1)"><span class="pt9"><font color=#000000>第页</font></span></a><span class="pt9"><font color=#000000> <a href="javascript:topage(<%=(CurPage-1)%>)"><span class="pt9"><font color=#000000>上页</font></span></a><span class="pt9"><font color=#000000>
<%Else%>
首页 上页
<%End If %>
 
<%If CurPage<rsBusi.PageCount Then %>
<a href="javascript:topage(<%=(CurPage+1)%>)"><span class="pt9"><font color=#000000>下页</font></span></a><span class="pt9"><font color=#000000> <a href="javascript:topage(<%=(TotalPages)%>)"><span class="pt9"><font color=#000000>尾页</font></span></a><span class="pt9"><font color=#000000>
<%Else%>
下页 尾页
<%End If %>
 转到第
<input style="background:transparent;border:0px solid white;border-bottom:1px solid black" type="normal" name="ToPage" size="1">
页</font></span></font></span></font></span></font></span></span></td>
</tr>
</form>
<%Else%>
<tr>
<td colspan="5" align="center"><font color="#FFFFFF" size="3"><b>数</b></font><font size="3"><b>据库中没有任何招聘求职信息!</b></font></td>
</tr>
<%end if %>
<tr>
...全文
4 点赞 收藏 9
写回复
9 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
zigine 2003-04-28
结了啊
回复
DieGhost 2003-04-28
解决了也不结贴?!!?
回复
DerryZhang 2003-04-28
up
回复
zigine 2003-04-28
谢谢,解决了,谢谢大家!有空与我联系QQ7787930
MSN: zigine@hotmail.com
回复
zigine 2003-04-28
4是求职的
3是招聘的
回复
DieGhost 2003-04-28
and b.type=3 or type=4

type是哪个表的???

and (b.type=3 or b.type=4)
回复
Zygodactyous 2003-04-28
没有完全看清楚,但在else语句后面的SQL语句中有这样一段“b.type=3 or type=4 ”
为什么type=4的type字段是哪个表中的?
回复
zigine 2003-04-28
可我的数据库里没有重复的记录,显示,那边的循环时,出来重复的。,我把type=3 or type=4
用其中的一个类型就不会重复,但,两个,一起用刚会重复,为什么呢?
回复
dapper 2003-04-28
先把SQL文打出来,放到查询设计器执行一下,看看有没有重复的纪录。
回复
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2003-04-28 01:47
社区公告
暂无公告