帮帮忙啊~~看看我的代码哪儿错啦
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>
<td bgcolor="#fa8c35" class="lrlb">
<div class="wz2">
<!--{$ShowArticle1(10)}-->
</div>
</td>
</tr>
</table>
我在一个页面中调用ShowArticle1()函数,该函数写在另一个文件里,这个函数如下:
<%
Function ShowArticle1(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,Cl_Channel B where 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
%>
可是显示不出效果来,运行后的效果如附件: