看看这个代码,是不是我写错啦,老是不对啊,效果没有~~
<%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>