紧急求助ASP问题:如何让所有用户都显示在页面上(原始程序只显示发表文章数》=1的用户) 20
DimSqlItem,RsItem,i,dwid,Result,HistrolyN,BeginDate,EndDate,allpagei=1BeginDate=""&ye...
Dim SqlItem,RsItem,i,dwid,Result,HistrolyN,BeginDate,EndDate,allpage
i=1
BeginDate = ""&year(date)&"-1-1" ' 开始日期 从本月1号开始
EndDate = "2029-12-31" ' 结束日期 不要改动
MaxPerPage=10 '显示列表数量
dwid=9 '会员组ID 要统计那些会员,注册会员 商业会员等
%>
<html><head><title>网站统计</title>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'><link href='Admin/Admin_Style.css' rel='stylesheet' type='text/css'>
</head>
<body leftmargin='2' topmargin='0' marginwidth='0' marginheight='0'>
<table border='0' align='center' cellpadding='2' cellspacing='1' class='border' width='180'>
<tr align='center' class='title'>
<td width="50">名次</td>
<td width='50'>单位</td>
<td width='50'>信息数</TD>
</tr>
<% set RsItem=server.createobject("adodb.recordset")
SqlItem="select Inputer,count(Inputer) as num from PE_Article where Status=3 and Deleted=False and UpdateTime between #"&BeginDate&"# and #"&EndDate&"# and Inputer in (select UserName from PE_User where GroupID="&dwid& ") group by Inputer order by count(Inputer) DESC "
RsItem.open SqlItem,Conn,1,1
if Not(RsItem.Eof) and Not(RsItem.Bof) then
RsItem.pagesize=MaxPerPage
allpage=RsItem.pagecount
RsItem.movefirst
RsItem.absolutepage=currentPage
Do While Not RsItem.Eof
%>
<tr align='center' class='tdbg2'><td align="center"><% Response.Write(i) %></td>
<td align="center"><% Response.Write(RsItem("Inputer"))%></td>
<td align="center"><% Response.Write(RsItem("num"))%></td></tr>
<% i=i+1
HistrolyN=HistrolyN+1
If HistrolyN >= MaxPerPage Then Exit Do
RsItem.Movenext
Loop
%>
</table>
<%Else%>
<table width="180" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr class="tdbg">
<td align="center">无任何记录!</td>
</tr>
</table>
<%End If
RsItem.Close
Set RsItem=nothing
%> 展开
i=1
BeginDate = ""&year(date)&"-1-1" ' 开始日期 从本月1号开始
EndDate = "2029-12-31" ' 结束日期 不要改动
MaxPerPage=10 '显示列表数量
dwid=9 '会员组ID 要统计那些会员,注册会员 商业会员等
%>
<html><head><title>网站统计</title>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'><link href='Admin/Admin_Style.css' rel='stylesheet' type='text/css'>
</head>
<body leftmargin='2' topmargin='0' marginwidth='0' marginheight='0'>
<table border='0' align='center' cellpadding='2' cellspacing='1' class='border' width='180'>
<tr align='center' class='title'>
<td width="50">名次</td>
<td width='50'>单位</td>
<td width='50'>信息数</TD>
</tr>
<% set RsItem=server.createobject("adodb.recordset")
SqlItem="select Inputer,count(Inputer) as num from PE_Article where Status=3 and Deleted=False and UpdateTime between #"&BeginDate&"# and #"&EndDate&"# and Inputer in (select UserName from PE_User where GroupID="&dwid& ") group by Inputer order by count(Inputer) DESC "
RsItem.open SqlItem,Conn,1,1
if Not(RsItem.Eof) and Not(RsItem.Bof) then
RsItem.pagesize=MaxPerPage
allpage=RsItem.pagecount
RsItem.movefirst
RsItem.absolutepage=currentPage
Do While Not RsItem.Eof
%>
<tr align='center' class='tdbg2'><td align="center"><% Response.Write(i) %></td>
<td align="center"><% Response.Write(RsItem("Inputer"))%></td>
<td align="center"><% Response.Write(RsItem("num"))%></td></tr>
<% i=i+1
HistrolyN=HistrolyN+1
If HistrolyN >= MaxPerPage Then Exit Do
RsItem.Movenext
Loop
%>
</table>
<%Else%>
<table width="180" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr class="tdbg">
<td align="center">无任何记录!</td>
</tr>
</table>
<%End If
RsItem.Close
Set RsItem=nothing
%> 展开
展开全部
SqlItem="select Inputer,count(Inputer) as num from PE_Article where Status=3 and Deleted=False and UpdateTime between #"&BeginDate&"# and #"&EndDate&"# and Inputer in (select UserName from PE_User where GroupID="&dwid& ") group by Inputer order by count(Inputer) DESC "
应该是 Status=3 这里的问题吧?这个字面看是 行内容的状态,不知道是什么状态。换成其他数字看看。
应该是 Status=3 这里的问题吧?这个字面看是 行内容的状态,不知道是什么状态。换成其他数字看看。
追问
把3改成其他任何数都显示无任何记录。怎么办?这是动易网络程序。 把Status=3 and这句删掉可以显示,但仍然不显示文章数为0的用户。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询