标题:看看这个代码,是不是我写错啦,老是不对啊,效果没有~~
只看楼主
yushan_0008
Rank: 1
等 级:新手上路
帖 子:82
专家分:0
注 册:2009-6-16
结帖率:86.96%
已结贴  问题点数:20 回复次数:1 
看看这个代码,是不是我写错啦,老是不对啊,效果没有~~
<%
Function ShowHits(Byval TopNum )
  TopNum        = Cl.ChkCLng(TopNum)
  dim SQL, Rs, i, sTemp
  if TopNum>0 then
        SQL="Select Top " & TopNum & " "
    else
        SQL="Select Top 15 "
    end if
    SQL=SQL & " B.ChannelName,A.ChannelID,B.ChannelDir,sum(A.Hits)as total from Cl_Article A Inner Join Cl_Channel B on A.channelID=B.ChannelID group by B.ChannelID,order by total Desc"
  Set Rs = Cl.Execute(SQL)
  SQL = Rs.GetRows(-1)
    Rs.Close : Set Rs=Nothing
    sTemp = "<ul >" & VbCrlf
    TopNum = Ubound(SQL,2)
    for i=0 to 10
            sTemp = sTemp & "<li><a href=""" & Cl.WebDir & SQL(2,i) & "/Index.asp"" "" target=""_blank"">" & SQL(0,i) &"</a>" &"("& SQL(3,i)&"次)</li><br />"
        next
        Showtotal = sTemp & "</ul>"
    SQL=Empty
end Function
%>这个函数是不是有问题啊?效果出不来,
<td width="75" align="left"><div >发布量排行</div></td>
                        </tr>
                      </table></td>
                    </tr>
                </table></td>
              </tr>
              <tr>
                <td height="24" class="cdbk"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td bgcolor="#fa8c35" class="lrlb">
                              <div class="wz2">
                                  <%=ShowTotal(1)%>
                              </div>
                      </td>
                    </tr>
                </table></td>

a.gif (264.74 KB)
搜索更多相关主题的帖子: 效果 代码 
2009-07-21 09:07
juran
Rank: 2
来 自:北京
等 级:论坛游民
帖 子:18
专家分:51
注 册:2009-7-22
得分:20 
Function ShowHits(Byval TopNum )
改成
Function ShowTotal(Byval TopNum )

SQL=Empty
改成
ShowTotal=sTemp
2009-07-22 15:23



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-279969-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.173979 second(s), 9 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved