循环生成HTML页面,结果总是只能得到同一条数据,循环的结果总没有得出!
循环生成HTML页面,结果总是只能得到同一条数据,循环的结果总没有得出!
可以生成 1_1.HTM 1_2.HTM 1_3.HTM ....但是为什么每一个页面都是一样的呢,
分面PAGE这个数己经从数据库中成功获取!不知是何问题,各位大哥,帮忙分析一下!
不胜感激!这个系统搞了三个通宵都没完,测试无数遍,实际不得己,只好找高手帮忙看下!
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<title> 批量生成HTML </title>
<style>
body{font-size:9pt;line-height:140%}
</style>
</head>
<body>
<%
bookid=22 '指定是那本书
jieno=request( "id ")
set rsr=server.createobject( "adodb.recordset ")
rsr.open "select count(*) as a1 from article where bookid= "&bookid& " and jie= "&jieno& " ",conn,1,1
countter=rsr( "a1 ")
'jieno=rsr( "jie ")
rsr.close
set rsr=nothing
'得到MY_PAGE.HTM的循环次数,生成分页页面!
set rs=server.createobject( "adodb.recordset ")
rs.open ( "select info_show from mb "),conn,1,1
pencat=rs( "info_show ")
rs.close
i=1
hao=1
Do While countter> 2
i=i+1
set rsd=server.createobject( "adodb.recordset ")
rsd.open "select * from article where bookid= "&bookid& " and page= "&i& " and jie= "&jieno& " ",conn,1,1
'select top 10 RootID,Topic,Body from Dv_bbs1 where boardid like 75 and Topic <> ' ' order by DateAndTime desc
'if not rs.eof then
ttid=rsd( "bookid ")
id=rsd( "articleid ")
page=rsd( "page ")
jie=rsd( "jie ")
book_edit=rsd( "book_edit ")
title=rsd( "title ")
form_user=rsd( "book_user ")
form_url=rsd( "book_url ")
info=rsd( "book_body ")
'book_edit=rs( "book_edit ")
'& " <img border= " "0 " " src= " "../down_info.asp?id= "&id& " " " width= " "1 " " height= " "1 " "> "
datetime=year(rsd( "datetime "))& "- "&month(rsd( "datetime "))& "- "&day(rsd( "datetime "))
'end if
rsd.close
if form_user <> " " then
else
form_user= "未知 "
end if
if form_url <> " "