回 帖 发 新 帖 刷新版面

主题:请帮我看一段代码,解决点问题!谢谢

我在代码编写时,建立一个的表格,想将统计出来的结果放在表格里面,但是却出现了相反结果,网站统计出一的信息在表格的上方去了,没在表格里面,怎么回事?哪里出错了?
<% 
  '/网站信息统计
    sub SiteCount()
    set rscount=server.createobject("adodb.recordset")    
    sqlCount="select Count(ID) from Info"
    rsCount.open sqlCount,conn,1,1
    
    response.write "<div align=center>"
    response.write "<table border=0 cellpadding=0 cellspacing=0 width=197 height=133 style='border:1px #AA7DD4 solid;'>"
    response.write "<tr>"
    response.write "<td height=30 width=197 background=images/1/index_36.gif></td> "
    response.write "</tr>"
    response.write "<tr>"    
  

    response.write "文章总数:" & rsCount(0) & "条<br>"
    rsCount.close
    sqlCount="select sum(Hits) from Info"
    rsCount.open sqlCount,conn,1,1
    response.write "文章浏览:" & rsCount(0) & "次<br>"
    rsCount.close
    sqlCount="select Count(ID) from zf11_type"
    rsCount.open sqlCount,conn,1,1
    response.write "栏目分类:" & rsCount(0) & "个<br>"
    rsCount.close
    sqlCount="select sum(Hit) from zf11_type"
    rsCount.open sqlCount,conn,1,1
    response.write "栏目浏览:" & rsCount(0) & "次<br>"
    rsCount.close
    sqlCount="select count(ID) from words"
    rsCount.open sqlCount,conn,1,1
    response.write "留言条数:" & rsCount(0) & "条<br>"
    rsCount.close
    

    response.write "</div>"
    response.write "</tr>"
    response.write "<tr>"
    response.write "<td height=13 width=180 ></td>"
    response.write "</tr>"
    
    set rsCount=nothing
    end sub  
%>    

回复列表 (共1个回复)

沙发

缺少<td>...</td>

 response.write "<tr>[color=FF0000]<td>[/color]"      

    response.write "文章总数:" & rsCount(0) & "条<br>"
    rsCount.close
    sqlCount="select sum(Hits) from Info"
    rsCount.open sqlCount,conn,1,1
    response.write "文章浏览:" & rsCount(0) & "次<br>"
    rsCount.close
    sqlCount="select Count(ID) from zf11_type"
    rsCount.open sqlCount,conn,1,1
    response.write "栏目分类:" & rsCount(0) & "个<br>"
    rsCount.close
    sqlCount="select sum(Hit) from zf11_type"
    rsCount.open sqlCount,conn,1,1
    response.write "栏目浏览:" & rsCount(0) & "次<br>"
    rsCount.close
    sqlCount="select count(ID) from words"
    rsCount.open sqlCount,conn,1,1
    response.write "留言条数:" & rsCount(0) & "条<br>"
    rsCount.close
    

    response.write "</div>"
    response.write "[color=FF0000]</td>[/color]</tr>"

我来回复

您尚未登录,请登录后再回复。点此登录或注册