happybiy 发表于 2003 年 4 月 10 日 00:00:00

[求助]看看这段代码哪里有错误?

<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
set rsvote=server.createobject("ADODB.recordset")
votesql="Select * from vote where id="&cint(request("id"))
rsvote.open votesql,conn,1,1
if not rsvote.eof then
votecontent=rsvote("votecontent")
title=rsvote("title")
count=rsvote("count")
votecontent=split(votecontent,"$")
count=split(count,"$")
totalcount=0
for i=Lbound(count) to Ubound(count)
totalcount=totalcount+count(i)
next
response.write "<table style=font-size:9pt><tr><td>"&title&"</td></tr>"
for ii=Lbound(votecontent) to Ubound(votecontent)
response.write "<tr><td>"&ii+1&":"&votecontent(ii)&"&nbsp&nbsp&nbsp"&count(ii)&"&nbsp&nbsp&nbsp"&formatnumber((count(ii)/totalcount)*100,2)&"%</td></tr>"
next
response.write "<tr><td align=right>总共"&totalcount&"票&nbsp&nbsp</td></tr></table>"
end if
rsvote.close
conn.close
set conn=nothing%>
谢谢

qq270525342 发表于 2011 年 2 月 6 日 21:23:49

帮楼主顶         
支持
页: [1]
查看完整版本: [求助]看看这段代码哪里有错误?